You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

36 lines
870 B

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