1 | <?php |
||
14 | abstract class AbstractTranslatableCustomEntity extends AbstractCustomEntity implements TranslatableInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var ArrayCollection |
||
18 | */ |
||
19 | protected $translations; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $locale; |
||
25 | |||
26 | /** |
||
27 | * Constructor |
||
28 | */ |
||
29 | public function __construct() |
||
33 | |||
34 | /** |
||
35 | * {@inheritdoc} |
||
36 | */ |
||
37 | public function addTranslation(TranslationInterface $translation) |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | public function getTranslation($locale = null) |
||
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public function setLocale($locale) |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | public function removeTranslation(TranslationInterface $translation) |
||
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | public function getTranslations() |
||
97 | |||
98 | /** |
||
99 | * @return string |
||
100 | */ |
||
101 | public function __toString() |
||
109 | } |
||
110 |