Resolved gh-442 to add a default catch all option to the setDynamicField method in the field class of the compiler.

This commit is contained in:
Llewellyn van der Merwe 2019-07-15 22:03:57 +02:00
parent e476bcb7b5
commit eae07504fa
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5

View File

@ -1089,16 +1089,6 @@ class Fields extends Structure
$this->setBuilders($langLabel, $langView, $view_name_single, $view_name_list, $name, $view, $field, $typeName, $multiple, false, $optionArray);
}
}
elseif (ComponentbuilderHelper::fieldCheck($typeName, 'plain'))
{
if ($build)
{
// set builders
$this->setBuilders($langLabel, $langView, $view_name_single, $view_name_list, $name, $view, $field, $typeName, $multiple);
}
// now add to the field set
$dynamicField = $this->setField('plain', $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray);
}
elseif (ComponentbuilderHelper::fieldCheck($typeName, 'spacer'))
{
if ($build)
@ -1150,6 +1140,16 @@ class Fields extends Structure
// now add to the field set
$dynamicField = $this->setField('custom', $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray, $custom);
}
else
{
if ($build)
{
// set builders
$this->setBuilders($langLabel, $langView, $view_name_single, $view_name_list, $name, $view, $field, $typeName, $multiple);
}
// now add to the field set
$dynamicField = $this->setField('plain', $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray);
}
}
}
return $dynamicField;