AbstractTranslation.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <?php
  2. namespace Gedmo\Translatable\Document\MappedSuperclass;
  3. use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoODM;
  4. /**
  5. * Gedmo\Translatable\Document\MappedSuperclass\AbstractTranslation
  6. *
  7. * @MongoODM\MappedSuperclass
  8. */
  9. abstract class AbstractTranslation
  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. * @var string $objectClass
  25. *
  26. * @MongoODM\String
  27. */
  28. protected $objectClass;
  29. /**
  30. * @var string $field
  31. *
  32. * @MongoODM\String
  33. */
  34. protected $field;
  35. /**
  36. * @var string $foreignKey
  37. *
  38. * @MongoODM\String(name="foreign_key")
  39. */
  40. protected $foreignKey;
  41. /**
  42. * @var string $content
  43. *
  44. * @MongoODM\String
  45. */
  46. protected $content;
  47. /**
  48. * Get id
  49. *
  50. * @return integer $id
  51. */
  52. public function getId()
  53. {
  54. return $this->id;
  55. }
  56. /**
  57. * Set locale
  58. *
  59. * @param string $locale
  60. * @return AbstractTranslation
  61. */
  62. public function setLocale($locale)
  63. {
  64. $this->locale = $locale;
  65. return $this;
  66. }
  67. /**
  68. * Get locale
  69. *
  70. * @return string $locale
  71. */
  72. public function getLocale()
  73. {
  74. return $this->locale;
  75. }
  76. /**
  77. * Set field
  78. *
  79. * @param string $field
  80. * @return AbstractTranslation
  81. */
  82. public function setField($field)
  83. {
  84. $this->field = $field;
  85. return $this;
  86. }
  87. /**
  88. * Get field
  89. *
  90. * @return string $field
  91. */
  92. public function getField()
  93. {
  94. return $this->field;
  95. }
  96. /**
  97. * Set object class
  98. *
  99. * @param string $objectClass
  100. * @return AbstractTranslation
  101. */
  102. public function setObjectClass($objectClass)
  103. {
  104. $this->objectClass = $objectClass;
  105. return $this;
  106. }
  107. /**
  108. * Get objectClass
  109. *
  110. * @return string $objectClass
  111. */
  112. public function getObjectClass()
  113. {
  114. return $this->objectClass;
  115. }
  116. /**
  117. * Set foreignKey
  118. *
  119. * @param string $foreignKey
  120. * @return AbstractTranslation
  121. */
  122. public function setForeignKey($foreignKey)
  123. {
  124. $this->foreignKey = $foreignKey;
  125. return $this;
  126. }
  127. /**
  128. * Get foreignKey
  129. *
  130. * @return string $foreignKey
  131. */
  132. public function getForeignKey()
  133. {
  134. return $this->foreignKey;
  135. }
  136. /**
  137. * Set content
  138. *
  139. * @param string $content
  140. * @return AbstractTranslation
  141. */
  142. public function setContent($content)
  143. {
  144. $this->content = $content;
  145. return $this;
  146. }
  147. /**
  148. * Get content
  149. *
  150. * @return string $content
  151. */
  152. public function getContent()
  153. {
  154. return $this->content;
  155. }
  156. }