register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ()); } /** * Inserts the toolbar button */ public function insert_button(Doku_Event $event, $param) { $syntax = array ( 'Single Issue' => array( 'icon' => '../../plugins/redissue/images/issue_single.png', 'open' => '', 'sample' => 'ISSUE_ID' ), 'Multiple Issue' => array( 'icon' => '../../plugins/redissue/images/issue_multiple.png', 'open' => '', 'sample' => 'TRACKER_ID' ), ); $redissue = array ( 'type' => 'picker', 'title' => $this->getLang('redissue.button'), 'icon' => '../../plugins/redissue/images/redmine.png', 'list' => array(), ); foreach ($syntax as $syntax_name => $syntax_data) { $redissue['list'] [] = array( 'type' => 'format', 'title' => $syntax_name, 'icon' => $syntax_data['icon'], 'open' => $syntax_data['open'], 'close' => $syntax_data['close'], 'sample' => $syntax_data['sample'], ); } $event->data[] = $redissue; } // insert_button }