generate_lang_file.php : handle LSattr_html::jsonCompositeAttribute config

This commit is contained in:
Benjamin Renard 2017-12-22 16:31:25 +01:00
parent e251878913
commit 2c79e92cbf

View file

@ -201,6 +201,38 @@ if (loadDir(LS_OBJECTS_DIR) && loadDir(LS_LOCAL_DIR.LS_OBJECTS_DIR)) {
add($pname);
}
}
// LSattr_html_jsonCompositeAttribute
if (is_array($attr['html_options']['components'])) {
foreach($attr['html_options']['components'] as $c => $cconfig) {
add($cconfig['label']);
// Component type select_list
if (is_array($cconfig['options']['possible_values'])) {
foreach($cconfig['options']['possible_values'] as $pkey => $pname) {
if (is_array($pname)) {
add($pname['label']);
if (is_array($pname['possible_values'])) {
foreach($pname['possible_values'] as $pk => $pn) {
if ($pk == 'OTHER_OBJECT') continue;
add($pn);
}
}
}
elseif ($pkey != 'OTHER_OBJECT') {
add($pname);
}
}
}
// Check data
if (is_array($cconfig['check_data'])) {
foreach($cconfig['check_data'] as $check) {
add($check['msg']);
}
}
}
}
// Check data
if (is_array($attr['check_data'])) {