Skip to content

Commit

Permalink
Merge pull request #234 from kokspflanze/bugfix/view_helper
Browse files Browse the repository at this point in the history
view helper AbstractPluginManager
  • Loading branch information
ThaDafinser committed Apr 13, 2016
2 parents ba02f46 + 41a2610 commit 58eee24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<?php
namespace ZfcDatagrid\Renderer\BootstrapTable\View\Helper;

use Zend\ServiceManager\AbstractPluginManager;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;

class TableRowFactory implements FactoryInterface
{
/**
* @param ServiceLocatorInterface $serviceLocator
* @param ServiceLocatorInterface|AbstractPluginManager $serviceLocator
* @return TableRow
*/
public function createService(ServiceLocatorInterface $serviceLocator)
{
$tableRow = new TableRow();
if ($serviceLocator->has('translator')) {
if ($serviceLocator->getServiceLocator()->has('translator')) {
/** @noinspection PhpParamsInspection */
$tableRow->setTranslator($serviceLocator->get('translator'));
$tableRow->setTranslator($serviceLocator->getServiceLocator()->get('translator'));
}

return $tableRow;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<?php
namespace ZfcDatagrid\Renderer\JqGrid\View\Helper;

use Zend\ServiceManager\AbstractPluginManager;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;

class ColumnsFactory implements FactoryInterface
{
/**
* @param ServiceLocatorInterface $serviceLocator
* @param ServiceLocatorInterface|AbstractPluginManager $serviceLocator
* @return Columns
*/
public function createService(ServiceLocatorInterface $serviceLocator)
{
$tableRow = new Columns();
if ($serviceLocator->has('translator')) {
if ($serviceLocator->getServiceLocator()->has('translator')) {
/** @noinspection PhpParamsInspection */
$tableRow->setTranslator($serviceLocator->get('translator'));
$tableRow->setTranslator($serviceLocator->getServiceLocator()->get('translator'));
}

return $tableRow;
Expand Down

0 comments on commit 58eee24

Please sign in to comment.