public function editAction() { $certificate = $this->getCertificateFromRoute(); if (!$certificate) { return $this->redirect()->toRoute('home'); } $id = (int) $this->params()->fromRoute('id', 0); $document = $this->getDocumentsTable()->get($id); if (!$document) { return $this->redirect()->toRoute('home', array('action' => 'view', 'type' => $certificate->type, 'ISIN' => $certificate->ISIN)); } $form = new DocumentForm(); $form->get('submit')->setValue('Edit'); return $this->_process($form, $certificate, $document); }
} $sessionConfig->setSavePath($target); } if (isset($configuration['sessionConfiguration']['options'])) { $sessionConfig->setOptions($configuration['sessionConfiguration']['options']); } $sessionManager->setConfig($sessionConfig); } return $sessionManager; }, 'Navigation' => 'Zend\\Navigation\\Service\\DefaultNavigationFactory', 'userNav' => 'Application\\Navigation\\Service\\UserNavigationFactory', 'Application\\Form\\Article' => function (ServiceManager $sm) { $form = new ArticleForm(); $form->setSettingsService($sm->get('Application\\Service\\Settings')); $form->setTranslator($sm->get('Translator')); return $form; }, 'Application\\Form\\Document' => function (ServiceManager $sm) { $form = new DocumentForm(); $form->setSettingsService($sm->get('Application\\Service\\Settings')); $form->setCustomerService($sm->get('Application\\Service\\Customer')); $form->setCompanyService($sm->get('Application\\Service\\Company')); $form->setSupplierService($sm->get('Application\\Service\\Supplier')); $form->setTranslator($sm->get('Translator')); return $form; }, 'Application\\Form\\ForgotPassword' => function (ServiceManager $sm) { $form = new ForgotPassword(); $form->setTranslator($sm->get('Translator')); return $form; }, 'Application\\Form\\NewPassword' => function (ServiceManager $sm) { $form = new NewPassword(); $form->setTranslator($sm->get('Translator')); return $form; }, 'Application\\Form\\Template' => function (ServiceManager $sm) {