Node.php 734 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Tree\Fixture;
  3. use Gedmo\Mapping\Annotation as Gedmo;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository")
  7. */
  8. class Node extends BaseNode
  9. {
  10. /**
  11. * @Gedmo\Translatable
  12. * @ORM\Column(name="title", type="string", length=64)
  13. */
  14. private $title;
  15. /**
  16. * @Gedmo\Translatable
  17. * @Gedmo\Slug(fields={"title"})
  18. * @ORM\Column(name="slug", type="string", length=128)
  19. */
  20. private $slug;
  21. public function getSlug()
  22. {
  23. return $this->slug;
  24. }
  25. public function setTitle($title)
  26. {
  27. $this->title = $title;
  28. }
  29. public function getTitle()
  30. {
  31. return $this->title;
  32. }
  33. }