add common config settings to template variables

This commit is contained in:
Daniel Seifert 2020-05-28 08:58:33 +02:00
parent d863806bf3
commit 10e9e7039e
Signed by: DanielS
GPG Key ID: 8A7C4C6ED1915C6F
1 changed files with 8 additions and 0 deletions

View File

@ -134,6 +134,14 @@ class d3DocumentRenderer implements BlockRendererInterface
$daux->initializeConfiguration();
$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'])) {
$variables = $params['variables'];
if (isset($variables) && is_array($variables) && count($variables)) {