public function editAction() { $this->_helper->layout()->setLayout('submenu'); $form = $this->_getForm(); $id = $this->_getParam('id'); $this->view->form = $form; $category = Model_Hm_Op_Category::findOneByIdForAdmin($id)->fetchOne(); $form->populate($category->toArray(true)); if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) { $category->fromArray($form->getValues()); $category->save(); $this->_helper->redirector('admin', 'options', null); } }