File modules/cms/action/link/LinkRemoveAction.class.php

Last commit: Sat Mar 6 03:42:38 2021 +0100	Jan Dankert	New: Better permission checks.
1 <?php 2 namespace cms\action\link; 3 use cms\action\Action; 4 use cms\action\LinkAction; 5 use cms\action\Method; 6 use cms\model\Permission; 7 use language\Messages; 8 9 10 class LinkRemoveAction extends LinkAction implements Method { 11 12 public function getRequiredPermission() { 13 return Permission::ACL_DELETE; 14 } 15 16 17 public function view() { 18 $this->setTemplateVar( 'name',$this->link->filename ); 19 } 20 21 public function post() { 22 $this->link->delete(); 23 $this->addNoticeFor( $this->link, Messages::DELETED ); 24 } 25 }
Download modules/cms/action/link/LinkRemoveAction.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.