*/ class action_plugin_example extends ActionPlugin { /** * Register the event handlers * * @param EventHandler $controller DokuWiki's event controller object */ public function register(EventHandler $controller) { $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', []); } /** * Inserts the toolbar button * * @param Event $event event object * @param mixed $param [the parameters passed as fifth argument to * register_hook() when this handler was registered, * here just an empty array..] */ public function insert_button(Event $event, $param) { $event->data[] = [ 'type' => 'format', 'title' => $this->getLang('qb_abutton'), 'icon' => '../../plugins/actionexample/abutton.png', 'open' => '', 'close' => '', ]; } }