check for set variables
Cette révision appartient à :
Parent
2b037e75e1
révision
c367955a66
@ -125,11 +125,14 @@ class d3DocumentRenderer implements BlockRendererInterface
|
||||
$daux = new Daux(Daux::STATIC_MODE, $output);
|
||||
$daux->initializeConfiguration();
|
||||
|
||||
$variables = $daux->getParams()['variables'];
|
||||
if (isset($variables) && is_array($variables) && count($variables)) {
|
||||
foreach ($variables as $varname => $varvalue) {
|
||||
$pattern = '/{\$'.$varname.'}/mU';
|
||||
$wholeDoc = preg_replace($pattern, $varvalue, $wholeDoc);
|
||||
$params = $daux->getParams();
|
||||
if (isset($params['variables'])) {
|
||||
$variables = $params['variables'];
|
||||
if (isset($variables) && is_array($variables) && count($variables)) {
|
||||
foreach ($variables as $varname => $varvalue) {
|
||||
$pattern = '/{\$'.$varname.'}/mU';
|
||||
$wholeDoc = preg_replace($pattern, $varvalue, $wholeDoc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Chargement…
Référencer dans un nouveau ticket
Block a user