AbstractTranslation.php 3.0 KB

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