public function activateAction() { $form = new Admin_Form_Menu(); if ($this->_request->isPost()) { if ($form->isValid($this->_request->getPost())) { $this->_menuItemMapper->setActiveValue($form->getValue('menuItemId'), $form->getValue('active')); $cache = Zend_Registry::get('cache'); $cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG, array(Application_Model_Cache_Menu::TAG)); return $this->_helper->redirector('index', 'index'); } } }
private function createMenuForm(Application_Model_Menu $menu) { $form = new Admin_Form_Menu(array('model' => $menu)); $form->populate($menu->toArray()); return $form; }