Conditions | 5 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function onAfterFieldDefinition($data, $item): void |
||
29 | { |
||
30 | $locales = Locale::get(); |
||
31 | |||
32 | foreach ($locales as $locale) { |
||
33 | $isDest = strpos($item['Destination'], $locale->Locale); |
||
34 | if (($isDest === 0 || $item['Destination'] === null) && $locale->Locale !== null) { |
||
35 | $copy = $item; |
||
36 | $copy['Field'] = $item['Field'] . '_' . $locale->Locale; |
||
37 | $data->push($copy); |
||
38 | } |
||
42 |