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