File modules/cms/action/page/PageRemoveAction.class.php

Last commit: Sat Mar 6 03:42:38 2021 +0100	Jan Dankert	New: Better permission checks.
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 }
Download modules/cms/action/page/PageRemoveAction.class.php
History Sat, 6 Mar 2021 03:42:38 +0100 Jan Dankert New: Better permission checks. Thu, 19 Nov 2020 14:49:58 +0100 Jan Dankert Fix: Action::addNotice() is replaced by Action::addNoticeFor() Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.