Exemplo n.º 1
0
 /**
  * Create Service Factory
  * 
  * @param ServiceLocatorInterface $serviceLocator
  */
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $inputFilterManager = $serviceLocator->get('InputFilterManager');
     $form = new RentalsForm('delete');
     $form->addIdElement();
     $form->addCsrfElement();
     $form->addSubmitElement('delete', 'Löschen');
     $form->addSubmitElement('cancel', 'Abbrechen');
     $form->setInputFilter($inputFilterManager->get('Rentals\\Filter\\Rentals'));
     $form->setValidationGroup(array('id', 'delete', 'cancel'));
     return $form;
 }
Exemplo n.º 2
0
 /**
  * Create Service Factory
  * 
  * @param ServiceLocatorInterface $serviceLocator
  */
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $inputFilterManager = $serviceLocator->get('InputFilterManager');
     $rentalsEntity = $serviceLocator->get('Rentals\\Entity\\Rentals');
     $form = new RentalsForm('create');
     $form->addCsrfElement();
     $form->addFromElement();
     $form->addToElement();
     $form->addDescriptionElement();
     $form->addSubmitElement('save', 'Speichern');
     $form->addSubmitElement('cancel', 'Abbrechen');
     $form->setInputFilter($inputFilterManager->get('Rentals\\Filter\\Rentals'));
     $form->setValidationGroup(array('from', 'to', 'save', 'cancel', 'description'));
     return $form;
 }