vendor/gedmo/doctrine-extensions/src/Translatable/Entity/MappedSuperclass/AbstractTranslation.php line 21

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of the Doctrine Behavioral Extensions package.
  4. * (c) Gediminas Morkevicius <gediminas.morkevicius@gmail.com> http://www.gediminasm.org
  5. * For the full copyright and license information, please view the LICENSE
  6. * file that was distributed with this source code.
  7. */
  8. namespace Gedmo\Translatable\Entity\MappedSuperclass;
  9. use Doctrine\DBAL\Types\Types;
  10. use Doctrine\ORM\Mapping as ORM;
  11. /**
  12. * Gedmo\Translatable\Entity\MappedSuperclass\AbstractTranslation
  13. *
  14. * @ORM\MappedSuperclass
  15. */
  16. #[ORM\MappedSuperclass]
  17. abstract class AbstractTranslation
  18. {
  19. /**
  20. * @var int
  21. *
  22. * @ORM\Column(type="integer")
  23. * @ORM\Id
  24. * @ORM\GeneratedValue(strategy="IDENTITY")
  25. */
  26. #[ORM\Column(type: Types::INTEGER)]
  27. #[ORM\Id]
  28. #[ORM\GeneratedValue(strategy: 'IDENTITY')]
  29. protected $id;
  30. /**
  31. * @var string
  32. *
  33. * @ORM\Column(type="string", length=8)
  34. */
  35. #[ORM\Column(type: Types::STRING, length: 8)]
  36. protected $locale;
  37. /**
  38. * @var string
  39. *
  40. * @ORM\Column(name="object_class", type="string", length=191)
  41. */
  42. #[ORM\Column(name: 'object_class', type: Types::STRING, length: 191)]
  43. protected $objectClass;
  44. /**
  45. * @var string
  46. *
  47. * @ORM\Column(type="string", length=32)
  48. */
  49. #[ORM\Column(type: Types::STRING, length: 32)]
  50. protected $field;
  51. /**
  52. * @var string
  53. *
  54. * @ORM\Column(name="foreign_key", type="string", length=64)
  55. */
  56. #[ORM\Column(name: 'foreign_key', type: Types::STRING, length: 64)]
  57. protected $foreignKey;
  58. /**
  59. * @var string
  60. *
  61. * @ORM\Column(type="text", nullable=true)
  62. */
  63. #[ORM\Column(type: Types::TEXT, nullable: true)]
  64. protected $content;
  65. /**
  66. * Get id
  67. *
  68. * @return int $id
  69. */
  70. public function getId()
  71. {
  72. return $this->id;
  73. }
  74. /**
  75. * Set locale
  76. *
  77. * @param string $locale
  78. *
  79. * @return static
  80. */
  81. public function setLocale($locale)
  82. {
  83. $this->locale = $locale;
  84. return $this;
  85. }
  86. /**
  87. * Get locale
  88. *
  89. * @return string
  90. */
  91. public function getLocale()
  92. {
  93. return $this->locale;
  94. }
  95. /**
  96. * Set field
  97. *
  98. * @param string $field
  99. *
  100. * @return static
  101. */
  102. public function setField($field)
  103. {
  104. $this->field = $field;
  105. return $this;
  106. }
  107. /**
  108. * Get field
  109. *
  110. * @return string
  111. */
  112. public function getField()
  113. {
  114. return $this->field;
  115. }
  116. /**
  117. * Set object class
  118. *
  119. * @param string $objectClass
  120. *
  121. * @return static
  122. */
  123. public function setObjectClass($objectClass)
  124. {
  125. $this->objectClass = $objectClass;
  126. return $this;
  127. }
  128. /**
  129. * Get objectClass
  130. *
  131. * @return string
  132. */
  133. public function getObjectClass()
  134. {
  135. return $this->objectClass;
  136. }
  137. /**
  138. * Set foreignKey
  139. *
  140. * @param string $foreignKey
  141. *
  142. * @return static
  143. */
  144. public function setForeignKey($foreignKey)
  145. {
  146. $this->foreignKey = $foreignKey;
  147. return $this;
  148. }
  149. /**
  150. * Get foreignKey
  151. *
  152. * @return string
  153. */
  154. public function getForeignKey()
  155. {
  156. return $this->foreignKey;
  157. }
  158. /**
  159. * Set content
  160. *
  161. * @param string $content
  162. *
  163. * @return static
  164. */
  165. public function setContent($content)
  166. {
  167. $this->content = $content;
  168. return $this;
  169. }
  170. /**
  171. * Get content
  172. *
  173. * @return string
  174. */
  175. public function getContent()
  176. {
  177. return $this->content;
  178. }
  179. }