AbstractTranslation.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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 $entity
  26. *
  27. * @Column(name="entity", type="string", length=255)
  28. */
  29. private $entity;
  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. */
  62. public function setLocale($locale)
  63. {
  64. $this->locale = $locale;
  65. }
  66. /**
  67. * Get locale
  68. *
  69. * @return string $locale
  70. */
  71. public function getLocale()
  72. {
  73. return $this->locale;
  74. }
  75. /**
  76. * Set field
  77. *
  78. * @param string $field
  79. */
  80. public function setField($field)
  81. {
  82. $this->field = $field;
  83. }
  84. /**
  85. * Get field
  86. *
  87. * @return string $field
  88. */
  89. public function getField()
  90. {
  91. return $this->field;
  92. }
  93. /**
  94. * Set entity
  95. *
  96. * @param string $entity
  97. */
  98. public function setEntity($entity)
  99. {
  100. $this->entity = $entity;
  101. }
  102. /**
  103. * Get entity
  104. *
  105. * @return string $entity
  106. */
  107. public function getEntity()
  108. {
  109. return $this->entity;
  110. }
  111. /**
  112. * Set foreignKey
  113. *
  114. * @param string $foreignKey
  115. */
  116. public function setForeignKey($foreignKey)
  117. {
  118. $this->foreignKey = $foreignKey;
  119. }
  120. /**
  121. * Get foreignKey
  122. *
  123. * @return string $foreignKey
  124. */
  125. public function getForeignKey()
  126. {
  127. return $this->foreignKey;
  128. }
  129. /**
  130. * Set content
  131. *
  132. * @param text $content
  133. */
  134. public function setContent($content)
  135. {
  136. $this->content = $content;
  137. }
  138. /**
  139. * Get content
  140. *
  141. * @return text $content
  142. */
  143. public function getContent()
  144. {
  145. return $this->content;
  146. }
  147. }