1<?php
2/**
3 * DokuWiki Plugin foldablelist
4 *
5 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
6 *
7 * @author medmen <med-men@gmx.net>
8 */
9
10if(!defined('DOKU_INC')) die();  // no Dokuwiki, no go
11
12class action_plugin_foldablelist extends DokuWiki_Action_Plugin
13{
14    /**
15     * Register the handle function in the controller
16     *
17     * @param Doku_event_handler $controller The event controller
18     */
19    function register(Doku_Event_Handler $controller)
20    {
21        $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'addconfig2js');
22    }
23
24
25    /**
26     * @param $event
27     * @param $params
28     */
29    function addconfig2js($event, $params)
30    {
31        global $JSINFO;
32        global $conf;
33        $this->loadConfig();
34        $JSINFO['plugin_foldablelist'] = $conf['plugin']['foldablelist'];
35    }
36}
37