public function editgroupAction() { $request = $this->getRequest(); $id = $request->getParam('id'); $id = $this->_helper->IdConvert->hexToStr($id); $logic = new Logic_User(); $form = new Logic_User_Form_UserGroup(); if ($request->isPost()) { if ($form->isCancelled($this->getRequest()->getPost())) { $this->_helper->redirector('listgroups', 'user', null); return; } if ($form->isValid($request->getPost())) { try { $logic->updateUserGroup($form, $id); $cache = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('cachemanager')->getCache('rolecache'); $cache->clean(Zend_Cache::CLEANING_MODE_ALL); $this->_helper->redirector('listgroups'); // $this->_helper->messenger->success('Edycja grupy czeka na akceptację.'); $this->_helper->messenger->success('Zedytowano grupę'); return; } catch (Logic_User_Exception $e) { $this->_helper->redirector('listgroups'); $this->_helper->messenger->error($e->getMessage()); } } } else { $data = array(); try { $data = $logic->showUserGroup($id); } catch (Logic_Branch_Exception $e) { $this->_helper->messenger->error(); $this->_helper->redirector('index'); return; } $form->setDefaults($data->toArray()); } $this->view->form = $form; }