add common config settings to template variables

Cette révision appartient à :
Daniel Seifert 2020-05-28 08:58:33 +02:00
Parent d863806bf3
révision 10e9e7039e
Signé par: DanielS
ID de la clé GPG: 8A7C4C6ED1915C6F

Voir le fichier

@ -134,6 +134,14 @@ class d3DocumentRenderer implements BlockRendererInterface
$daux->initializeConfiguration(); $daux->initializeConfiguration();
$params = $daux->getParams(); $params = $daux->getParams();
foreach ($params as $varname => $varvalue) {
if (false == is_array($varvalue)) {
$pattern = '/{\$'.$varname.'}/mU';
$wholeDoc = preg_replace($pattern, $varvalue, $wholeDoc);
}
}
if (isset($params['variables'])) { if (isset($params['variables'])) {
$variables = $params['variables']; $variables = $params['variables'];
if (isset($variables) && is_array($variables) && count($variables)) { if (isset($variables) && is_array($variables) && count($variables)) {