コード例 #1
0
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $form = new Job();
     $inputFilter = $serviceLocator->getServiceLocator()->get('InputFilterManager')->get('Jobs/NewJob');
     $form->setInputFilter($inputFilter);
     return $form;
 }
コード例 #2
0
ファイル: JobFactory.php プロジェクト: cross-solution/yawik
 /**
  * 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;
 }