Improved the plugin form builder, to allow multi form field relationships.

This commit is contained in:
2019-08-22 03:54:47 +02:00
parent c13c752abb
commit d2f94d84fa
65 changed files with 1225 additions and 431 deletions

View File

@ -333,6 +333,13 @@ class Fields extends Structure
*/
public $movedPublishingFields = array();
/**
* Extention Custom Fields
*
* @var array
*/
public $extentionCustomfields = array();
/**
* Set the line number in comments
*
@ -1659,7 +1666,8 @@ class Fields extends Structure
}
$field .= PHP_EOL . $this->_t(2) . $taber . "/>";
// incase the field is in the config and has not been set
if ('config' === $view_name_single && 'configs' === $view_name_list)
if ('config' === $view_name_single && 'configs' === $view_name_list||
strpos($view_name_single, 'P|uG!n') !== false)
{
// set lang (just incase)
$listLangName = $langView . '_' . ComponentbuilderHelper::safeString($name, 'U');
@ -2144,8 +2152,9 @@ class Fields extends Structure
$field->fieldXML->addAttribute($property, $value);
}
}
// incase the field is in the config and has not been set
if ('config' === $view_name_single && 'configs' === $view_name_list)
// incase the field is in the config and has not been set (or is part of a plugin or module)
if (('config' === $view_name_single && 'configs' === $view_name_list) ||
strpos($view_name_single, 'P|uG!n') !== false)
{
// set lang (just incase)
$listLangName = $langView . '_' . ComponentbuilderHelper::safeString($name, 'U');
@ -3241,6 +3250,12 @@ class Fields extends Structure
$this->fileContentDynamic['customfield_' . $data['type']][$this->hhh . 'ADD_BUTTON' . $this->hhh] = $this->setAddButtonToListField($data['custom']);
}
}
// if this field gets used in plugin or module we should track it so if needed we can copy it over
if (strpos($view_name_single, 'P|uG!n') !== false &&
isset($data['custom']) && isset($data['custom']['type']))
{
$this->extentionCustomfields[$data['type']] = $data['custom']['type'];
}
}
/**