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
return array( | |
'controllers' => array( | |
'initializers' => array( | |
function ($instance, $serviceManager) { | |
if ($instance instanceof EntityManagerAwareInterface) { | |
if($serviceManager->has('doctrine.entitymanager.orm_default')) { | |
$instance->setEntityManager($serviceManager->get('doctrine.entitymanager.orm_default')); | |
} | |
} | |
[...] |
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
<?php | |
namespace Admin; | |
return array( | |
'invokables' => array( | |
'serviceFactory' => 'cwdAdmin\Service\ServiceFactory', | |
), | |
'factories' => array( | |
'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory', |
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
return array( | |
'factories' => array( | |
'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory', | |
'default_cache' => function($sm) { | |
$cache = \Zend\Cache\StorageFactory::factory(array( | |
'adapter' => array( | |
'name' => 'apc', | |
'options' => array( | |
), | |
), |
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
class ShowMessages extends AbstractHelper | |
{ | |
/** | |
* FlashMessenger | |
* @var unknown_type | |
*/ | |
protected $_fm = NULL; | |
public function __construct(FlashMessenger $fm) | |
{ |
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
<?php | |
namespace Admin\Form; | |
use Zend\Form\Element\Select; | |
class Agency extends Form { | |
public function __construct() | |
{ |
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
public function createAction() | |
{ | |
$service = $this->getService(); | |
$form = $service->getForm(); | |
$entity = $service->getEntity(); | |
$form->bind($entity); | |
if($this->request->isPost()) { | |
$mandator = $this->getEntityManager()->find('Admin\Entity\Mandator', $_POST['mandator_id']); //<--- should not be needed |
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
array | |
'agencyId' => int 4 | |
'name' => string 'Testing' (length=7) | |
'address' => string '' (length=0) | |
'address2' => string '' (length=0) | |
'zipcode' => string '' (length=0) | |
'city' => string '' (length=0) | |
'country' => string 'AF' (length=2) | |
'phone' => string '' (length=0) | |
'fax' => string '' (length=0) |
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
<?php | |
namespace Admin\Hydrator; | |
use cwdCommon\Doctrine\EntityManagerAwareInterface; | |
use Zend\Stdlib\Hydrator\Strategy\DefaultStrategy; | |
class AgencyStrategy extends DefaultStrategy implements EntityManagerAwareInterface | |
{ | |
/** | |
* @var \Doctrine\ORM\EntityManager |
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
<?php | |
return array( | |
'modules' => array( | |
'ZendDeveloperTools', | |
'DoctrineModule', | |
'DoctrineORMModule', | |
'cwdAdmin', | |
'ZfcBase', | |
'ZfcRbac', | |
//'Application', |
OlderNewer