public function newAction() { $this->_helper->layout()->setLayout('submenu'); $form = $this->_getForm(); $option = new Model_Hm_Op_Option(); $this->view->form = $form; if ($this->_getParam('category')) { $form->populate(array('hm_op_category_id' => $this->_getParam('category'))); } if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) { $option->fromArray($form->getValues()); $option->save(); $this->_helper->redirector('admin', 'options'); } }