Conditions | 5 |
Paths | 5 |
Total Lines | 24 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | public function reverseTransform(array $submittedField): ?TranslationValueInterface |
||
32 | { |
||
33 | foreach ($submittedField as $theme => $themeInfo) { |
||
34 | foreach ($themeInfo as $domain => $domainInfo) { |
||
35 | foreach ($domainInfo as $key => $keyInfo) { |
||
36 | foreach ($keyInfo as $locale => $value) { |
||
37 | $translation = new Translation(); |
||
38 | $translation->setDomainName($domain); |
||
39 | $translation->setKey($key); |
||
40 | |||
41 | $translationValue = new TranslationValue(); |
||
42 | $translationValue->setTheme($theme); |
||
43 | $translationValue->setLocaleCode($locale); |
||
44 | $translationValue->setValue($value); |
||
45 | |||
46 | $translation->addValue($translationValue); |
||
47 | |||
48 | return $translationValue; |
||
49 | } |
||
50 | } |
||
51 | } |
||
52 | } |
||
53 | |||
54 | return null; |
||
55 | } |
||
57 |