1<?php 2/** 3 * Delete Page Button plugin 4 * 5 * @copyright (c) 2020 Damien Regad 6 * @license GPLv2 or later (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) 7 * @author Damien Regad 8 */ 9 10namespace dokuwiki\plugin\deletepagebutton; 11use dokuwiki\Menu\Item\AbstractItem; 12 13/** 14 * Class DeletePageButton 15 * 16 * Implements the plugin's Delete button for DokuWiki's menu system 17 * 18 * @package dokuwiki\plugin\deletepagebutton 19 */ 20class DeletePageButton extends AbstractItem { 21 22 /** @var string icon file */ 23 protected $svg = __DIR__ . '/images/trash-can-outline.svg'; 24 25 /** @inheritdoc */ 26 public function __construct() { 27 parent::__construct(); 28 $this->params['sectok'] = getSecurityToken(); 29 } 30 31 /** 32 * Get label from plugin language file 33 * 34 * @return string 35 */ 36 public function getLabel() { 37 $plugin = plugin_load('action', $this->type); 38 return $plugin->getLang('menu_item'); 39 } 40 41} 42