コード例 #1
0
ファイル: Page.php プロジェクト: ei-grad/phorm
 /**
  * Текст статьи
  * 
  * @return void
  */
 public function viewAction()
 {
     if (isset($this->_params['pageuid']) && ($PageInfo = $this->Page->getPageInfo($this->_params['pageuid']))) {
         $this->view->headTitle($PageInfo['pagename'], 'SET');
         $this->view->assign('PageInfo', $PageInfo);
         $this->view->assign('PageList', $this->Page->getPageList(array('rowsperpage' => 0)));
     } else {
         return $this->_forward('notfound', 'error', null, array('controller' => 'error', 'action' => 'notfound'));
     }
 }
コード例 #2
0
ファイル: Page.php プロジェクト: ei-grad/phorm
 /**
  * Удаление страницы
  * 
  * @return void
  */
 public function deleteAction()
 {
     if (isset($this->_params['pageid']) && ($PageInfo = $this->Page->getPageInfo($this->_params['pageid']))) {
         if ($this->Page->deletePage($PageInfo)) {
             return $this->composeSuccessMessage('Выбранная страница удалена', '/control/' . $this->_params['controller'] . '/?tree=reload&pageid=0');
         } else {
             return $this->composeErrorMessage('Не удалось удалить страницу', '/control/' . $this->_params['controller'] . '/');
         }
     } else {
         return $this->composeErrorMessage('Страница с указанным Id не найдена', '/control/' . $this->_params['controller'] . '/');
     }
 }