Article.php 795 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace Sluggable\Fixture\Issue131;
  3. use Gedmo\Mapping\Annotation as Gedmo;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity
  7. */
  8. class Article
  9. {
  10. /**
  11. * @ORM\Id
  12. * @ORM\GeneratedValue
  13. * @ORM\Column(type="integer")
  14. */
  15. private $id;
  16. /**
  17. * @Gedmo\Sluggable
  18. * @ORM\Column(length=64)
  19. */
  20. private $title;
  21. /**
  22. * @Gedmo\Slug(updatable=true, unique=true)
  23. * @ORM\Column(length=64, unique=true, nullable=true)
  24. */
  25. private $slug;
  26. public function getId()
  27. {
  28. return $this->id;
  29. }
  30. public function setTitle($title)
  31. {
  32. $this->title = $title;
  33. }
  34. public function getTitle()
  35. {
  36. return $this->title;
  37. }
  38. public function getSlug()
  39. {
  40. return $this->slug;
  41. }
  42. }