Little fix to the field builder in the compiler
This commit is contained in:
parent
73d383c755
commit
9285f0a2b1
@ -2094,9 +2094,8 @@ class Fields extends Structure
|
|||||||
}
|
}
|
||||||
elseif ($property['name'] === 'extension' || $property['name'] === 'directory' || $property['name'] === 'formsource')
|
elseif ($property['name'] === 'extension' || $property['name'] === 'directory' || $property['name'] === 'formsource')
|
||||||
{
|
{
|
||||||
$xmlValue = ComponentbuilderHelper::getBetween($field['settings']->xml, $property['name'] . '="', '"');
|
// get value & replace the placeholders
|
||||||
// replace the placeholders
|
$xmlValue = $this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, $property['name'] . '="', '"'), $placeholders);
|
||||||
$xmlValue = $this->setPlaceholders($xmlValue, $placeholders);
|
|
||||||
}
|
}
|
||||||
// catch all PHP here
|
// catch all PHP here
|
||||||
elseif (strpos($property['name'], 'type_php') !== false && $setCustom)
|
elseif (strpos($property['name'], 'type_php') !== false && $setCustom)
|
||||||
@ -2123,27 +2122,23 @@ class Fields extends Structure
|
|||||||
}
|
}
|
||||||
elseif ($property['name'] === 'view' && $setCustom)
|
elseif ($property['name'] === 'view' && $setCustom)
|
||||||
{
|
{
|
||||||
// load the view name
|
// load the view name & replace the placeholders
|
||||||
$fieldAttributes['custom']['view'] = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'view="', '"'));
|
$fieldAttributes['custom']['view'] = ComponentbuilderHelper::safeString($this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'view="', '"'), $placeholders));
|
||||||
}
|
}
|
||||||
elseif ($property['name'] === 'views' && $setCustom)
|
elseif ($property['name'] === 'views' && $setCustom)
|
||||||
{
|
{
|
||||||
// load the views name
|
// load the views name & replace the placeholders
|
||||||
$fieldAttributes['custom']['views'] = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'views="', '"'));
|
$fieldAttributes['custom']['views'] = ComponentbuilderHelper::safeString($this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'views="', '"'), $placeholders));
|
||||||
}
|
}
|
||||||
elseif ($property['name'] === 'component' && $setCustom)
|
elseif ($property['name'] === 'component' && $setCustom)
|
||||||
{
|
{
|
||||||
// load the component name
|
// load the component name & replace the placeholders
|
||||||
$fieldAttributes['custom']['component'] = ComponentbuilderHelper::getBetween($field['settings']->xml, 'component="', '"');
|
$fieldAttributes['custom']['component'] = $this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'component="', '"'), $placeholders);
|
||||||
// replace the placeholders
|
|
||||||
$fieldAttributes['custom']['component'] = $this->setPlaceholders($fieldAttributes['custom']['component'], $placeholders);
|
|
||||||
}
|
}
|
||||||
elseif ($property['name'] === 'table' && $setCustom)
|
elseif ($property['name'] === 'table' && $setCustom)
|
||||||
{
|
{
|
||||||
// load the main table that is queried
|
// load the main table that is queried & replace the placeholders
|
||||||
$fieldAttributes['custom']['table'] = ComponentbuilderHelper::getBetween($field['settings']->xml, 'table="', '"');
|
$fieldAttributes['custom']['table'] = $this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'table="', '"'), $placeholders);
|
||||||
// replace the placeholders
|
|
||||||
$fieldAttributes['custom']['table'] = $this->setPlaceholders($fieldAttributes['custom']['table'], $placeholders);
|
|
||||||
}
|
}
|
||||||
elseif ($property['name'] === 'value_field' && $setCustom)
|
elseif ($property['name'] === 'value_field' && $setCustom)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user