1<?php 2/** 3 * DokuWiki Plugin dokutts (Action Component) 4 * 5 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html 6 * @author dodotori <dodotori@localhost> 7 */ 8class action_plugin_dokutts extends \dokuwiki\Extension\ActionPlugin 9{ 10 11 /** @inheritDoc */ 12 public function register(Doku_Event_Handler $controller) 13 { 14 $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'handle_toolbar_define',array()); 15 // $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this,'_hookjs'); 16 17 18 } 19 20 /** 21 * FIXME Event handler for 22 * 23 * @param Doku_Event $event event object by reference 24 * @param mixed $param optional parameter passed when event was registered 25 * @return void 26 */ 27 public function handle_toolbar_define(Doku_Event $event, $param) 28 { 29 $event->data[] = array ( 30 'type' => 'dokutts', 31 'title' => $this->getLang('qb_abutton'), 32 'icon' => '../../plugins/dokutts/dokutts.ico', 33 ); 34 } 35 36 37 38 39 40 41 42}