AbstractPersonalTranslation.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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\Field(type="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\Field(type="string")
  32. */
  33. protected $field;
  34. /**
  35. * @var string $content
  36. *
  37. * @MongoODM\Field(type="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. *
  54. * @return static
  55. */
  56. public function setLocale($locale)
  57. {
  58. $this->locale = $locale;
  59. return $this;
  60. }
  61. /**
  62. * Get locale
  63. *
  64. * @return string
  65. */
  66. public function getLocale()
  67. {
  68. return $this->locale;
  69. }
  70. /**
  71. * Set field
  72. *
  73. * @param string $field
  74. *
  75. * @return static
  76. */
  77. public function setField($field)
  78. {
  79. $this->field = $field;
  80. return $this;
  81. }
  82. /**
  83. * Get field
  84. *
  85. * @return string
  86. */
  87. public function getField()
  88. {
  89. return $this->field;
  90. }
  91. /**
  92. * Set object related
  93. *
  94. * @param object $object
  95. *
  96. * @return static
  97. */
  98. public function setObject($object)
  99. {
  100. $this->object = $object;
  101. return $this;
  102. }
  103. /**
  104. * Get object related
  105. *
  106. * @return string
  107. */
  108. public function getObject()
  109. {
  110. return $this->object;
  111. }
  112. /**
  113. * Set content
  114. *
  115. * @param string $content
  116. *
  117. * @return static
  118. */
  119. public function setContent($content)
  120. {
  121. $this->content = $content;
  122. return $this;
  123. }
  124. /**
  125. * Get content
  126. *
  127. * @return string
  128. */
  129. public function getContent()
  130. {
  131. return $this->content;
  132. }
  133. }