Skip to content

Instantly share code, notes, and snippets.

@fabiocarneiro
Created October 23, 2013 20:10
Show Gist options
  • Save fabiocarneiro/7125821 to your computer and use it in GitHub Desktop.
Save fabiocarneiro/7125821 to your computer and use it in GitHub Desktop.
<?php
namespace Cart;
use Zend\Mvc\ModuleRouteListener;
use Zend\Mvc\MvcEvent;
class Module
{
public function getFormElementConfig()
{
return array(
'factories' => array(
'AssociationFieldset' => function($sm) {
$entityManager = $sm->getServiceLocator()->get('Doctrine\ORM\EntityManager');
$fieldset = new AssociationFieldset();
$fieldset->setEntityManager($entityManager);
return $fieldset;
},
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment