public function deletePage($apiKey, $id) { if (!$this->_validateKey($apiKey)) { return array('error' => 'invalid api key', 'status' => false); } // open the page $itemPage = new CMS_Content_Item_Page($id); if ($itemPage) { $itemPage->delete(); return true; } else { return false; } }
public function deleteAction() { $id = $this->_request->getParam('id'); $itemPage = new CMS_Content_Item_Page($id); $itemPage->delete(); return $this->_forward('list'); }