AbstractTranslation.php 3.0 KB

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