Vehicle.php 946 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace Sluggable\Fixture\Inheritance;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. /**
  6. * @ORM\Entity
  7. * @ORM\InheritanceType("SINGLE_TABLE")
  8. * @ORM\DiscriminatorColumn(name="discriminator", type="string")
  9. * @ORM\DiscriminatorMap({
  10. * "vehicle" = "Vehicle",
  11. * "car" = "Car"
  12. * })
  13. */
  14. class Vehicle
  15. {
  16. /**
  17. * @ORM\Id
  18. * @ORM\GeneratedValue
  19. * @ORM\Column(type="integer")
  20. */
  21. private $id;
  22. /**
  23. * @Gedmo\Sluggable
  24. * @ORM\Column(length=128)
  25. */
  26. private $title;
  27. /**
  28. * @Gedmo\Slug
  29. * @ORM\Column(length=128, unique=true)
  30. */
  31. private $slug;
  32. public function getId()
  33. {
  34. return $this->id;
  35. }
  36. public function setTitle($title)
  37. {
  38. $this->title = $title;
  39. }
  40. public function getTitle()
  41. {
  42. return $this->title;
  43. }
  44. public function getSlug()
  45. {
  46. return $this->slug;
  47. }
  48. }