bundle/w3des/AdminBundle/src/Entity/Url.php line 18

Open in your IDE?
  1. <?php
  2. namespace w3des\AdminBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use w3des\AdminBundle\Model\ServiceAwareInterface;
  5. /**
  6. * @ORM\Table(uniqueConstraints={
  7. * @ORM\UniqueConstraint(columns={"service","locale", "path"}, name="url_path_uniq", options={"charset" = "ascii", "collate" = "ascii_general_ci"}),
  8. * @ORM\UniqueConstraint(columns={"service","locale", "slug"}, name="url_node_uniq", options={"charset" = "ascii", "collate" = "ascii_general_ci"}),
  9. * }, indexes={
  10. * @ORM\Index(name="url_service_idx", columns={"service"}),
  11. * @ORM\Index(name="url_service_target_idx", columns={"type", "target"}),
  12. * })
  13. *
  14. * @ORM\Entity()
  15. */
  16. class Url implements ServiceAwareInterface
  17. {
  18. /**
  19. * @ORM\Column(type="bigint")
  20. * @ORM\Id()
  21. * @ORM\GeneratedValue(strategy="AUTO")
  22. */
  23. private $id;
  24. /**
  25. * @ORM\Column(type="integer")
  26. */
  27. private $service;
  28. /**
  29. * @ORM\Column(type="string", length=2)
  30. */
  31. private $locale;
  32. /**
  33. * @ORM\Column(type="string")
  34. */
  35. private $slug;
  36. /**
  37. * @ORM\Column(type="string", length=1000)
  38. */
  39. private $path;
  40. /**
  41. * @ORM\Column(type="string")
  42. */
  43. private $type = 'node';
  44. /**
  45. * @ORM\Column(type="string")
  46. */
  47. private $target;
  48. public function getLocale()
  49. {
  50. return $this->locale;
  51. }
  52. public function setLocale($locale)
  53. {
  54. $this->locale = $locale;
  55. return $this;
  56. }
  57. public function getSlug()
  58. {
  59. return $this->slug;
  60. }
  61. public function setSlug($slug)
  62. {
  63. $this->slug = $slug;
  64. return $this;
  65. }
  66. public function getPath()
  67. {
  68. return $this->path;
  69. }
  70. public function setPath($path)
  71. {
  72. $this->path = $path;
  73. return $this;
  74. }
  75. public function getId()
  76. {
  77. return $this->id;
  78. }
  79. public function setId($id)
  80. {
  81. $this->id = $id;
  82. return $this;
  83. }
  84. /**
  85. * @return $service
  86. */
  87. public function getService(): int
  88. {
  89. return $this->service;
  90. }
  91. /**
  92. * @param mixed $service
  93. */
  94. public function setService(int $service)
  95. {
  96. $this->service = $service;
  97. }
  98. /**
  99. * @return $type
  100. */
  101. public function getType()
  102. {
  103. return $this->type;
  104. }
  105. /**
  106. * @param mixed $type
  107. */
  108. public function setType($type)
  109. {
  110. $this->type = $type;
  111. }
  112. /**
  113. * @return $target
  114. */
  115. public function getTarget()
  116. {
  117. return $this->target;
  118. }
  119. /**
  120. * @param mixed $target
  121. */
  122. public function setTarget($target)
  123. {
  124. $this->target = $target;
  125. }
  126. }