AbstractTranslation.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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\Field(type="string")
  21. */
  22. protected $locale;
  23. /**
  24. * @var string $objectClass
  25. *
  26. * @MongoODM\Field(type="string")
  27. */
  28. protected $objectClass;
  29. /**
  30. * @var string $field
  31. *
  32. * @MongoODM\Field(type="string")
  33. */
  34. protected $field;
  35. /**
  36. * @var string $foreignKey
  37. *
  38. * @MongoODM\Field(type="string", name="foreign_key")
  39. */
  40. protected $foreignKey;
  41. /**
  42. * @var string $content
  43. *
  44. * @MongoODM\Field(type="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. *
  61. * @return static
  62. */
  63. public function setLocale($locale)
  64. {
  65. $this->locale = $locale;
  66. return $this;
  67. }
  68. /**
  69. * Get locale
  70. *
  71. * @return string
  72. */
  73. public function getLocale()
  74. {
  75. return $this->locale;
  76. }
  77. /**
  78. * Set field
  79. *
  80. * @param string $field
  81. *
  82. * @return static
  83. */
  84. public function setField($field)
  85. {
  86. $this->field = $field;
  87. return $this;
  88. }
  89. /**
  90. * Get field
  91. *
  92. * @return string
  93. */
  94. public function getField()
  95. {
  96. return $this->field;
  97. }
  98. /**
  99. * Set object class
  100. *
  101. * @param string $objectClass
  102. *
  103. * @return static
  104. */
  105. public function setObjectClass($objectClass)
  106. {
  107. $this->objectClass = $objectClass;
  108. return $this;
  109. }
  110. /**
  111. * Get objectClass
  112. *
  113. * @return string
  114. */
  115. public function getObjectClass()
  116. {
  117. return $this->objectClass;
  118. }
  119. /**
  120. * Set foreignKey
  121. *
  122. * @param string $foreignKey
  123. *
  124. * @return static
  125. */
  126. public function setForeignKey($foreignKey)
  127. {
  128. $this->foreignKey = $foreignKey;
  129. return $this;
  130. }
  131. /**
  132. * Get foreignKey
  133. *
  134. * @return string
  135. */
  136. public function getForeignKey()
  137. {
  138. return $this->foreignKey;
  139. }
  140. /**
  141. * Set content
  142. *
  143. * @param string $content
  144. *
  145. * @return static
  146. */
  147. public function setContent($content)
  148. {
  149. $this->content = $content;
  150. return $this;
  151. }
  152. /**
  153. * Get content
  154. *
  155. * @return string
  156. */
  157. public function getContent()
  158. {
  159. return $this->content;
  160. }
  161. }