mirror of
https://github.com/flextype/flextype.git
synced 2025-08-23 21:33:01 +02:00
feat(core): add ability to extends fieldsets #301
change order for fieldsets extending. now it is works like twig templates "extends" somehow
This commit is contained in:
@@ -94,12 +94,12 @@ class Forms
|
||||
if (is_array($fieldset['extends'])) {
|
||||
foreach ($fieldset['extends'] as $extends) {
|
||||
$extends_fieldset_content = Filesystem::read($this->flextype->fieldsets->getFileLocation($extends));
|
||||
$fieldset = array_replace_recursive($fieldset, $this->flextype->parser->decode($extends_fieldset_content, 'yaml'));
|
||||
$fieldset = array_replace_recursive($this->flextype->parser->decode($extends_fieldset_content, 'yaml'), $fieldset);
|
||||
}
|
||||
} else {
|
||||
$extends_fieldset_content = Filesystem::read($this->flextype->fieldsets->getFileLocation($fieldset['extends']));
|
||||
$extends_fieldset = $this->flextype->parser->decode($extends_fieldset_content, 'yaml');
|
||||
$fieldset = array_replace_recursive($fieldset, $extends_fieldset);
|
||||
$fieldset = array_replace_recursive($extends_fieldset, $fieldset);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user