Exemple #1
0
 /**
  * Delete page
  * 
  * @return void
  */
 public function deleteAction()
 {
     $this->setNoRender();
     $this->disableLayout();
     $request = $this->getRequest();
     if (!$request->isPost()) {
         return;
     }
     $pageId = $request->getPost('page_id');
     $page = Modules_Page_Services_Page::getById($pageId);
     $condition = array('parent_id' => $pageId);
     if (null == $page || Modules_Page_Services_Page::count($condition) > 0) {
         $this->getResponse()->setBody('RESULT_NOT_OK');
         return;
     }
     /**
      * Delete category
      */
     Modules_Page_Services_Page::delete($page);
     $this->getResponse()->setBody('RESULT_OK');
 }