1 | <?php namespace Modules\Translation\Services; |
||
7 | class TranslationsService |
||
8 | { |
||
9 | /** |
||
10 | * @var FileTranslationRepository |
||
11 | */ |
||
12 | private $fileTranslations; |
||
13 | /** |
||
14 | * @var TranslationRepository |
||
15 | */ |
||
16 | private $databaseTranslations; |
||
17 | |||
18 | public function __construct() |
||
23 | |||
24 | /** |
||
25 | * Get the file translations & the database translations, overwrite the file translations by db translations |
||
26 | * @return TranslationGroup |
||
27 | */ |
||
28 | public function getFileAndDatabaseMergedTranslations() |
||
50 | |||
51 | /** |
||
52 | * Filter out the non-active locales |
||
53 | * @param array $allFileTranslations |
||
54 | */ |
||
55 | private function filterOnlyActiveLocales(array &$allFileTranslations) |
||
65 | |||
66 | /** |
||
67 | * Get the currently active locales |
||
68 | * @return array |
||
69 | */ |
||
70 | private function getActiveLocales() |
||
80 | |||
81 | /** |
||
82 | * @param array $allFileTranslations |
||
83 | * @param array $allDatabaseTranslations |
||
84 | */ |
||
85 | private function addDatabaseOnlyTranslations(array &$allFileTranslations, array $allDatabaseTranslations) |
||
93 | } |
||
94 |