1*6983cdfdSLORTET<?php 2*6983cdfdSLORTET 3*6983cdfdSLORTETclass action_plugin_catmenu_buttons extends DokuWiki_Action_Plugin 4*6983cdfdSLORTET{ 5*6983cdfdSLORTET public function register(Doku_Event_Handler $controller) 6*6983cdfdSLORTET { 7*6983cdfdSLORTET $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'handleToolbar'); 8*6983cdfdSLORTET } 9*6983cdfdSLORTET 10*6983cdfdSLORTET public function handleToolbar(Doku_Event $event, $param) 11*6983cdfdSLORTET { 12*6983cdfdSLORTET if (!(bool)$this->getConf('show_in_editor_menu')) return; 13*6983cdfdSLORTET 14*6983cdfdSLORTET $event->data[] = [ 15*6983cdfdSLORTET 'type' => 'insert', 16*6983cdfdSLORTET 'title' => 'CatMenu', 17*6983cdfdSLORTET 'icon' => '../../plugins/catmenu/images/default.png', 18*6983cdfdSLORTET 'insert' => '{{catmenu>.}}' 19*6983cdfdSLORTET ]; 20*6983cdfdSLORTET } 21*6983cdfdSLORTET} 22