AbstractPersonalTranslation.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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
  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. * @return AbstractPersonalTranslation
  56. */
  57. public function setLocale($locale)
  58. {
  59. $this->locale = $locale;
  60. return $this;
  61. }
  62. /**
  63. * Get locale
  64. *
  65. * @return string $locale
  66. */
  67. public function getLocale()
  68. {
  69. return $this->locale;
  70. }
  71. /**
  72. * Set field
  73. *
  74. * @param string $field
  75. * @return AbstractPersonalTranslation
  76. */
  77. public function setField($field)
  78. {
  79. $this->field = $field;
  80. return $this;
  81. }
  82. /**
  83. * Get field
  84. *
  85. * @return string $field
  86. */
  87. public function getField()
  88. {
  89. return $this->field;
  90. }
  91. /**
  92. * Set object related
  93. *
  94. * @param string $object
  95. * @return AbstractPersonalTranslation
  96. */
  97. public function setObject($object)
  98. {
  99. $this->object = $object;
  100. return $this;
  101. }
  102. /**
  103. * Get related object
  104. *
  105. * @return object $object
  106. */
  107. public function getObject()
  108. {
  109. return $this->object;
  110. }
  111. /**
  112. * Set content
  113. *
  114. * @param string $content
  115. * @return AbstractPersonalTranslation
  116. */
  117. public function setContent($content)
  118. {
  119. $this->content = $content;
  120. return $this;
  121. }
  122. /**
  123. * Get content
  124. *
  125. * @return string $content
  126. */
  127. public function getContent()
  128. {
  129. return $this->content;
  130. }
  131. }