forked from desolat/DokuWiki-Pagemove-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathMenuItem.php
35 lines (32 loc) · 870 Bytes
/
MenuItem.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace dokuwiki\plugin\move;
use dokuwiki\Menu\Item\AbstractItem;
/**
* Class MenuItem
*
* Implements the Rename button for DokuWiki's menu system
*
* @package dokuwiki\plugin\move
*/
class MenuItem extends AbstractItem {
/** @var string icon file */
protected $svg = __DIR__ . '/images/rename.svg';
protected $type = "plugin_move";
public function getLinkAttributes($classprefix = 'menuitem ') {
$attr = parent::getLinkAttributes($classprefix);
if (empty($attr['class'])) {
$attr['class'] = '';
}
$attr['class'] .= ' plugin_move_page ';
return $attr;
}
/**
* Get label from plugin language file
*
* @return string
*/
public function getLabel() {
$hlp = plugin_load('action', 'move_rename');
return $hlp->getLang('renamepage');
}
}