AbstractTranslation.php 2.9 KB

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