PageRemoveAction.class.php (496B)
1 <?php 2 namespace cms\action\page; 3 use cms\action\Method; 4 use cms\action\PageAction; 5 use cms\model\Permission; 6 use language\Messages; 7 8 class PageRemoveAction extends PageAction implements Method { 9 10 public function getRequiredPermission() { 11 return Permission::ACL_DELETE; 12 } 13 14 15 public function view() { 16 $this->setTemplateVar( 'name',$this->page->filename ); 17 } 18 19 public function post() { 20 $this->page->delete(); 21 $this->addNoticeFor( $this->page,Messages::DELETED); 22 } 23 }