1<?php
2
3if (!defined('DOKU_INC')) { die(); }
4
5class action_plugin_gitlabapi extends DokuWiki_Action_Plugin {
6    function register(Doku_Event_Handler $controller) {
7        $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array());
8    }
9
10    function insert_button(&$event, $param) {
11        $event->data[] = array(
12            'type' => 'format',
13            'title' => $this->getLang('button'),
14            'icon' => '../../plugins/gitlabapi/images/gitlab.png',
15            'open' => '<gitlab-api project-path="<NAMESPACE>/<PROJECT_NAME>" milestones="1" issues="3" commits="5" pipelines="1"',
16            'close' => ' />',
17        );
18    }
19}
20
21
22