Ejemplo n.º 1
0
 protected function showForm($isAdd)
 {
     $user = $this->authenticate();
     $isGroup = $this->_request->type == 'group';
     if (!$this->_request->type) {
         $this->_request->setParam('type', 'feed');
     }
     $this->view->isNew = $isAdd;
     $this->view->type = $this->_request->type;
     if (!$isAdd) {
         if (!$this->_request->id || !($feed = $this->feeds->get($this->_request->id))) {
             return $this->_helper->getHelper('Redirector')->goto('add');
         }
         $this->view->assign($feed);
     }
     if ($this->_request->isPost()) {
         $this->processForm($user['id'], $isAdd);
     }
     $this->view->groups = $this->feeds->getGroupNames();
     $this->_helper->getHelper('ViewRenderer')->render('form');
     $this->_helper->getHelper('ViewRenderer')->setNoRender(true);
 }