Article.php 1006 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. namespace Translatable\Fixture\Document;
  3. use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoODM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. /**
  6. * @MongoODM\Document(collection="articles")
  7. */
  8. class Article
  9. {
  10. /** @MongoODM\Id */
  11. private $id;
  12. /**
  13. * @Gedmo\Translatable
  14. * @MongoODM\String
  15. */
  16. private $title;
  17. /**
  18. * @Gedmo\Translatable
  19. * @MongoODM\String
  20. */
  21. private $code;
  22. /**
  23. * @Gedmo\Slug(fields={"title", "code"})
  24. * @Gedmo\Translatable
  25. * @MongoODM\String
  26. */
  27. private $slug;
  28. public function getId()
  29. {
  30. return $this->id;
  31. }
  32. public function setTitle($title)
  33. {
  34. $this->title = $title;
  35. }
  36. public function getTitle()
  37. {
  38. return $this->title;
  39. }
  40. public function setCode($code)
  41. {
  42. $this->code = $code;
  43. }
  44. public function getCode()
  45. {
  46. return $this->code;
  47. }
  48. public function getSlug()
  49. {
  50. return $this->slug;
  51. }
  52. }