diff --git a/src/ZfcDatagrid/Renderer/AbstractRenderer.php b/src/ZfcDatagrid/Renderer/AbstractRenderer.php index 7ebd4c26..5fcaf457 100644 --- a/src/ZfcDatagrid/Renderer/AbstractRenderer.php +++ b/src/ZfcDatagrid/Renderer/AbstractRenderer.php @@ -644,7 +644,9 @@ public function prepareViewModel(Datagrid $grid) $viewModel->setVariable('overwriteUrl', $grid->getUrl()); $viewModel->setVariable('templateToolbar', $this->getToolbarTemplate()); - $viewModel->setVariable('templateToolbarVariables', $this->getToolbarTemplateVariables()); + foreach ($this->getToolbarTemplateVariables() as $key => $value) { + $viewModel->setVariable($key, $value); + } $viewModel->setVariable('rendererName', $this->getName()); $options = $this->getOptions();