AbstractPersonalTranslation.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <?php
  2. namespace Gedmo\Translatable\Entity\MappedSuperclass;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * Gedmo\Translatable\Entity\MappedSuperclass\AbstractPersonalTranslation
  6. *
  7. * @ORM\MappedSuperclass
  8. */
  9. abstract class AbstractPersonalTranslation
  10. {
  11. /**
  12. * @var integer $id
  13. *
  14. * @ORM\Column(type="integer")
  15. * @ORM\Id
  16. * @ORM\GeneratedValue(strategy="IDENTITY")
  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 $field
  27. *
  28. * @ORM\Column(type="string", length=32)
  29. */
  30. protected $field;
  31. /**
  32. * Related entity with ManyToOne relation
  33. * must be mapped by user
  34. */
  35. protected $object;
  36. /**
  37. * @var string $content
  38. *
  39. * @ORM\Column(type="text", nullable=true)
  40. */
  41. protected $content;
  42. /**
  43. * Get id
  44. *
  45. * @return integer $id
  46. */
  47. public function getId()
  48. {
  49. return $this->id;
  50. }
  51. /**
  52. * Set locale
  53. *
  54. * @param string $locale
  55. *
  56. * @return static
  57. */
  58. public function setLocale($locale)
  59. {
  60. $this->locale = $locale;
  61. return $this;
  62. }
  63. /**
  64. * Get locale
  65. *
  66. * @return string
  67. */
  68. public function getLocale()
  69. {
  70. return $this->locale;
  71. }
  72. /**
  73. * Set field
  74. *
  75. * @param string $field
  76. *
  77. * @return static
  78. */
  79. public function setField($field)
  80. {
  81. $this->field = $field;
  82. return $this;
  83. }
  84. /**
  85. * Get field
  86. *
  87. * @return string $field
  88. */
  89. public function getField()
  90. {
  91. return $this->field;
  92. }
  93. /**
  94. * Set object related
  95. *
  96. * @param object $object
  97. *
  98. * @return static
  99. */
  100. public function setObject($object)
  101. {
  102. $this->object = $object;
  103. return $this;
  104. }
  105. /**
  106. * Get related object
  107. *
  108. * @return object
  109. */
  110. public function getObject()
  111. {
  112. return $this->object;
  113. }
  114. /**
  115. * Set content
  116. *
  117. * @param string $content
  118. *
  119. * @return static
  120. */
  121. public function setContent($content)
  122. {
  123. $this->content = $content;
  124. return $this;
  125. }
  126. /**
  127. * Get content
  128. *
  129. * @return string
  130. */
  131. public function getContent()
  132. {
  133. return $this->content;
  134. }
  135. }