1 | <?php |
||
8 | trait TranslatableTrait |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $locale; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $defaultLocale; |
||
19 | |||
20 | /** |
||
21 | * @see TranslatableInterface::setLocale() |
||
22 | */ |
||
23 | public function setLocale($locale) |
||
29 | |||
30 | /** |
||
31 | * @see TranslatableInterface::setDefaultLocale() |
||
32 | */ |
||
33 | public function setDefaultLocale($defaultLocale) |
||
39 | |||
40 | /** |
||
41 | * return translation matching current locale from given translation data |
||
42 | * |
||
43 | * @param array $translationData |
||
44 | * @param string $default |
||
45 | * |
||
46 | * @return string |
||
47 | */ |
||
48 | protected function getTranslation(array $translationData, $default = '') |
||
66 | } |
||
67 |