1<?php
2
3namespace dokuwiki\plugin\tplmod;
4
5use dokuwiki\Menu\Item\AbstractItem;
6
7/**
8 * Class MenuItem
9 *
10 *
11 * @package dokuwiki\plugin\tplmod
12 */
13class MenuItem extends AbstractItem {
14
15    /** @var string do action for this plugin */
16    protected $type = '';
17    private  $btn_name;
18
19    /** @var string icon file */
20     protected $svg = __DIR__ . '/06-revert_replay.svg';
21
22    /**
23     * MenuItem constructor.
24     * @param string $btn_name (can be passed in from the  event handler)
25     */
26    public function __construct($btn_name = "") {
27         parent::__construct();
28         $this->params['do']="";
29         if($btn_name)  {
30            $this->btn_name = $btn_name;
31         }
32
33    }
34
35    /**
36     * Get label from plugin language file
37     *
38     * @return string
39     */
40    public function getLabel() {
41        return $this->btn_name;
42     }
43
44     public function getLink() {
45         return 'javascript:tplmod_toggle_aside();void(0);';
46     }
47}
48