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

Last commit: Wed Oct 14 01:46:43 2026 +0200	Jan Dankert	PHP 8: Fix: Method signature must match the interface.
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(): int { 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 Wed, 14 Oct 2026 01:46:43 +0200 Jan Dankert PHP 8: Fix: Method signature must match the interface. 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.