AbstractPersonalTranslation.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <?php
  2. namespace Gedmo\Translatable\Document\MappedSuperclass;
  3. use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoODM;
  4. /**
  5. * Gedmo\Translatable\Document\AbstractPersonalTranslation
  6. *
  7. * @MongoODM\MappedSuperclass
  8. */
  9. abstract class AbstractPersonalTranslation
  10. {
  11. /**
  12. * @var integer $id
  13. *
  14. * @MongoODM\Id
  15. */
  16. protected $id;
  17. /**
  18. * @var string $locale
  19. *
  20. * @MongoODM\String
  21. */
  22. protected $locale;
  23. /**
  24. * Related entity with ManyToOne relation
  25. * must be mapped by user
  26. */
  27. protected $object;
  28. /**
  29. * @var string $field
  30. *
  31. * @MongoODM\String
  32. */
  33. protected $field;
  34. /**
  35. * @var string $content
  36. *
  37. * @MongoODM\String
  38. */
  39. protected $content;
  40. /**
  41. * Get id
  42. *
  43. * @return integer $id
  44. */
  45. public function getId()
  46. {
  47. return $this->id;
  48. }
  49. /**
  50. * Set locale
  51. *
  52. * @param string $locale
  53. * @return AbstractPersonalTranslation
  54. */
  55. public function setLocale($locale)
  56. {
  57. $this->locale = $locale;
  58. return $this;
  59. }
  60. /**
  61. * Get locale
  62. *
  63. * @return string $locale
  64. */
  65. public function getLocale()
  66. {
  67. return $this->locale;
  68. }
  69. /**
  70. * Set field
  71. *
  72. * @param string $field
  73. * @return AbstractPersonalTranslation
  74. */
  75. public function setField($field)
  76. {
  77. $this->field = $field;
  78. return $this;
  79. }
  80. /**
  81. * Get field
  82. *
  83. * @return string $field
  84. */
  85. public function getField()
  86. {
  87. return $this->field;
  88. }
  89. /**
  90. * Set object related
  91. *
  92. * @param object $object
  93. * @return AbstractPersonalTranslation
  94. */
  95. public function setObject($object)
  96. {
  97. $this->object = $object;
  98. return $this;
  99. }
  100. /**
  101. * Get object related
  102. *
  103. * @return string $object
  104. */
  105. public function getObject()
  106. {
  107. return $this->object;
  108. }
  109. /**
  110. * Set content
  111. *
  112. * @param string $content
  113. * @return AbstractPersonalTranslation
  114. */
  115. public function setContent($content)
  116. {
  117. $this->content = $content;
  118. return $this;
  119. }
  120. /**
  121. * Get content
  122. *
  123. * @return string $content
  124. */
  125. public function getContent()
  126. {
  127. return $this->content;
  128. }
  129. }