1<?php
2/**
3 * Eventum Plugin:  Evetnum SCM addons
4 *
5 * Adds Eventum button to edit toolbar
6 *
7 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
8 * @author     Elan Ruusamäe <glen@delfi.ee>
9 */
10if(!defined('DOKU_INC')) die();  // no Dokuwiki, no go
11
12/**
13 * All DokuWiki plugins to extend the parser/rendering mechanism
14 * need to inherit from this class
15 */
16class action_plugin_eventum extends DokuWiki_Action_Plugin {
17    /**
18     * plugin should use this method to register its handlers with the dokuwiki's event controller
19     */
20    function register(Doku_Event_Handler $controller) {
21      $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button');
22    }
23
24    /**
25     * Inserts a toolbar button
26     */
27    function insert_button(&$event) {
28        $event->data[] = array(
29            'type' => 'format',
30            'title' => $this->getLang('btn_issue'),
31            'icon' => '../../plugins/eventum/images/eventum.gif',
32            'open' => '[[issue>',
33            'close' => ']]',
34            'key'    => 'e',
35        );
36    }
37}
38
39//Setup VIM: ex: et ts=4 enc=utf-8 :
40