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