1<?php
2
3namespace dokuwiki\plugin\file2dw;
4use dokuwiki\Menu\Item\AbstractItem;
5
6/**
7 * Class MenuItem
8 *
9 * Implements the import button for DokuWiki's menu system
10 *
11 * @package dokuwiki\plugin\file2dw
12 */
13class MenuItem extends AbstractItem {
14    /** @var string do action for this plugin */
15    public $type = 'file2dw';
16    /** @var string icon file */
17    public $svg = __DIR__ . '/writer.svg';
18    /**
19     * MenuItem constructor.
20     */
21    public function __construct() {
22        parent::__construct();
23        global $REV;
24        if($REV) $this->params['rev'] = $REV;
25    }
26    /**
27     * Get label from plugin language file
28     *
29     * @return string
30     */
31    public function getLabel() {
32        $hlp = plugin_load('action', 'file2dw');
33        return $hlp->getLang('import_button');
34    }
35}