public function createService(ServiceLocatorInterface $serviceLocator) { $form = new Job(); $inputFilter = $serviceLocator->getServiceLocator()->get('InputFilterManager')->get('Jobs/NewJob'); $form->setInputFilter($inputFilter); return $form; }
/** * Create service * * @param ServiceLocatorInterface $serviceLocator * * @return mixed */ public function createService(ServiceLocatorInterface $serviceLocator) { /* @var \Zend\Form\FormElementManager $serviceLocator */ $services = $serviceLocator->getServiceLocator(); $events = $services->get('Jobs/JobContainer/Events'); $job = new Job(); $job->setEventManager($events); return $job; }