Gets the translatable fields of a given job item.
array $form: The form array.
array $fields Returns the translatable fields of the job item.
private function getTranslatableFields(array $form) {
$fields = [];
foreach (Element::children($form['review']) as $group_key) {
foreach (Element::children($form['review'][$group_key]) as $parent_key) {
foreach ($form['review'][$group_key][$parent_key] as $key => $data) {
if (isset($data['translation'])) {
$fields[$key] = [
'parent_key' => $parent_key,
'group_key' => $group_key,
'data' => $data,
];
}
}
}
}
return $fields;
}