/** * ACTION - Backend edit action. * * @access public * @return View * @throws Exception\Code403 * @throws Exception\Code404 * @throws Exception\Fatal * @since 1.0.0-alpha * @version 1.0.0-alpha */ public function actionEdit() { $sIdParam = Router::getParam('id'); if ($sIdParam === FALSE) { throw new Exception\Code404(); } $this->addeditJs(); try { $this->loadModelForActions(); } catch (Exception $oExc) { $this->addToTitle(__('Error')); $this->addSystemMessage('XXX', 'danger'); die('TODO'); } // check permissions $this->checkPermissions('edit'); // add title ad breadcrumb $this->alterBreadcrumbsTitleEdit(); $oConfig = new ModelCore\ModelFormConfig(); $oConfig->setMessage(__('Edit operation was successful.')); $oModelForm = $this->getModel()->form('edit', $oConfig); /* @var $oModelForm \Plethora\ModelCore\ModelForm */ $oForm = $oModelForm->generate(); return View::factory($this->sViewForm)->bind('oForm', $oForm)->set('sTitle', $this->getTitle()); }