Company.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace Sluggable\Fixture\Handler;
  3. use Gedmo\Mapping\Annotation as Gedmo;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity
  7. */
  8. class Company
  9. {
  10. /**
  11. * @ORM\Id
  12. * @ORM\GeneratedValue
  13. * @ORM\Column(type="integer")
  14. */
  15. private $id;
  16. /**
  17. * @ORM\Column(length=64)
  18. */
  19. private $title;
  20. /**
  21. * @Gedmo\Slug(handlers={
  22. * @Gedmo\SlugHandler(class="Gedmo\Sluggable\Handler\InversedRelativeSlugHandler", options={
  23. * @Gedmo\SlugHandlerOption(name="relationClass", value="Sluggable\Fixture\Handler\User"),
  24. * @Gedmo\SlugHandlerOption(name="mappedBy", value="company"),
  25. * @Gedmo\SlugHandlerOption(name="inverseSlugField", value="slug")
  26. * })
  27. * }, fields={"title"})
  28. * @ORM\Column(length=64, unique=true)
  29. */
  30. private $alias;
  31. public function getId()
  32. {
  33. return $this->id;
  34. }
  35. public function setTitle($title)
  36. {
  37. $this->title = $title;
  38. }
  39. public function getTitle()
  40. {
  41. return $this->title;
  42. }
  43. public function getAlias()
  44. {
  45. return $this->alias;
  46. }
  47. }