/** Delete a help topic * @access public * @return void */ public function deleteAction() { if ($this->_request->isPost()) { $id = (int) $this->_request->getPost('id'); $del = $this->_request->getPost('del'); if ($del == 'Yes' && $id > 0) { $where = 'id = ' . $id; $this->_help->delete($where); $this->getFlash()->addMessage('Record deleted!'); } $this->redirect('/admin/help/'); } else { $id = (int) $this->_request->getParam('id'); if ($id > 0) { $this->view->content = $this->_help->fetchRow('id=' . $id); } } }
/** Show images attached to record * @access public * @return void * @throws Pas_Exception_Param */ public function attachedAction() { if ($this->getParam('id', false)) { $help = new Help(); $this->view->contents = $help->fetchRow('id = 14')->toArray(); $images = new Slides(); $this->view->images = $images->getSlides($this->getParam('id')); } else { throw new Pas_Exception_Param($this->_missingParameter, 404); } }