-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
readded ServiceLocatorAwareTrait in ZfcDataGrid\Datagrid [remove part…
…s of the BC] added TableRowFactory + ColumnsFactory for the ViewHelpers [so config cache should now work] also removed the other closure and added InvokableFactory in config update composer.json min zend-mvc 2.7 + zend-servicemanger 2.7 [moved to require] updated unittests
- Loading branch information
1 parent
49f23d3
commit 5f8451d
Showing
9 changed files
with
78 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/ZfcDatagrid/Renderer/BootstrapTable/View/Helper/TableRowFactory.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
|
||
namespace ZfcDatagrid\Renderer\BootstrapTable\View\Helper; | ||
|
||
|
||
use Zend\ServiceManager\FactoryInterface; | ||
use Zend\ServiceManager\ServiceLocatorInterface; | ||
|
||
class TableRowFactory implements FactoryInterface | ||
{ | ||
/** | ||
* @param ServiceLocatorInterface $serviceLocator | ||
* @return TableRow | ||
*/ | ||
public function createService(ServiceLocatorInterface $serviceLocator) | ||
{ | ||
$tableRow = new TableRow(); | ||
if($serviceLocator->has('translator')){ | ||
/** @noinspection PhpParamsInspection */ | ||
$tableRow->setTranslator($serviceLocator->get('translator')); | ||
} | ||
|
||
return $tableRow; | ||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
src/ZfcDatagrid/Renderer/JqGrid/View/Helper/ColumnsFactory.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
|
||
namespace ZfcDatagrid\Renderer\JqGrid\View\Helper; | ||
|
||
|
||
use Zend\ServiceManager\FactoryInterface; | ||
use Zend\ServiceManager\ServiceLocatorInterface; | ||
|
||
class ColumnsFactory implements FactoryInterface | ||
{ | ||
/** | ||
* @param ServiceLocatorInterface $serviceLocator | ||
* @return Columns | ||
*/ | ||
public function createService(ServiceLocatorInterface $serviceLocator) | ||
{ | ||
$tableRow = new Columns(); | ||
if($serviceLocator->has('translator')){ | ||
/** @noinspection PhpParamsInspection */ | ||
$tableRow->setTranslator($serviceLocator->get('translator')); | ||
} | ||
|
||
return $tableRow; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters