openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

LinkRemoveAction.class.php (522B)


      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 }