From 41a26108db6e170b7a32b8425eef2ca0eac67c20 Mon Sep 17 00:00:00 2001 From: KoKsPfLaNzE Date: Tue, 5 Apr 2016 23:20:14 +0200 Subject: [PATCH] added getServiceLocator in both view-helper, we get a `Zend\ServiceManager\AbstractPluginManager` object so we have to use this method --- .../BootstrapTable/View/Helper/TableRowFactory.php | 7 ++++--- .../Renderer/JqGrid/View/Helper/ColumnsFactory.php | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ZfcDatagrid/Renderer/BootstrapTable/View/Helper/TableRowFactory.php b/src/ZfcDatagrid/Renderer/BootstrapTable/View/Helper/TableRowFactory.php index 07b42255..a086538e 100644 --- a/src/ZfcDatagrid/Renderer/BootstrapTable/View/Helper/TableRowFactory.php +++ b/src/ZfcDatagrid/Renderer/BootstrapTable/View/Helper/TableRowFactory.php @@ -1,21 +1,22 @@ has('translator')) { + if ($serviceLocator->getServiceLocator()->has('translator')) { /** @noinspection PhpParamsInspection */ - $tableRow->setTranslator($serviceLocator->get('translator')); + $tableRow->setTranslator($serviceLocator->getServiceLocator()->get('translator')); } return $tableRow; diff --git a/src/ZfcDatagrid/Renderer/JqGrid/View/Helper/ColumnsFactory.php b/src/ZfcDatagrid/Renderer/JqGrid/View/Helper/ColumnsFactory.php index 7e728f54..c5ca7242 100644 --- a/src/ZfcDatagrid/Renderer/JqGrid/View/Helper/ColumnsFactory.php +++ b/src/ZfcDatagrid/Renderer/JqGrid/View/Helper/ColumnsFactory.php @@ -1,21 +1,22 @@ has('translator')) { + if ($serviceLocator->getServiceLocator()->has('translator')) { /** @noinspection PhpParamsInspection */ - $tableRow->setTranslator($serviceLocator->get('translator')); + $tableRow->setTranslator($serviceLocator->getServiceLocator()->get('translator')); } return $tableRow;