Example #1
0
 public function indexAction()
 {
     $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('advgroup_admin_main', array(), 'advgroup_admin_main_global');
     $this->view->form = $form = new Advgroup_Form_Admin_Global();
     if ($this->getRequest()->isPost() && $this->view->form->isValid($this->getRequest()->getPost())) {
         $form->saveValues();
     }
 }
 public function indexAction()
 {
     $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('advgroup_admin_main', array(), 'advgroup_admin_main_settings');
     $this->view->form = $form = new Advgroup_Form_Admin_Global();
     if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {
         $values = $form->getValues();
         foreach ($values as $key => $value) {
             Engine_Api::_()->getApi('settings', 'core')->setSetting($key, $value);
         }
         $form->addNotice('Your changes have been saved.');
     }
 }