1<?php
2
3namespace dokuwiki\plugin\odt;
4
5use dokuwiki\Menu\Item\AbstractItem;
6
7/**
8 * Class MenuItemODT
9 *
10 * Implements the ODT export button for DokuWiki's menu system
11 *
12 * @package dokuwiki\plugin\odt
13 */
14class MenuItemODT extends AbstractItem {
15
16    /** @var string do action for this plugin */
17    protected $type = 'export_odt';
18
19    /** @var string icon file */
20    protected $svg = DOKU_INC . 'lib/plugins/odt/menu-odt.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', 'odt_export');
38        return $hlp->getLang('export_odt_button');
39    }
40}
41