Exemplo n.º 1
0
 public function navAction()
 {
     $menu = $this->getRequest()->getParam('menu');
     $category = new App_Model_MenuCategories();
     $cat = $category->fetchRow(array("menu_name ='" . $menu . "'", 'active = 1'));
     $model = new App_Model_Page();
     $this->view->menus = $model->menuItems($cat->id, false);
     $this->view->sub = $model->menuItems($cat->id, true);
 }
Exemplo n.º 2
0
 public function indexAction()
 {
     $this->view->message = $this->_helper->flashMessenger->getMessages();
     $model = new App_Model_MenuCategories();
     $cat = $model->fetchAll();
     $request = $this->getRequest();
     $form = new Admin_Form_Menu_Categories($cat);
     if ($this->getRequest()->isPost()) {
         if ($form->isValid($request->getPost())) {
             $model = new App_Model_Departments();
             $model->addDepartment($form->getValues());
             return $this->_redirect('/admin/menu/category/cat/' . $form->getValue('category'));
         }
     }
     $this->view->form = $form;
 }