aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/plugins/testing/action.php
blob: 48945c337eb37e79ec19d3a2f67ca2ec1d4dfc58 (plain) (blame)
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
<?php

use dokuwiki\Extension\ActionPlugin;
use dokuwiki\Extension\EventHandler;
use dokuwiki\Extension\Event;

/**
 * Plugin for testing the test system
 *
 * This plugin doesn't really do anything and should always be disabled
 *
 * @author Tobias Sarnowski <tobias@trustedco.de>
 */
class action_plugin_testing extends ActionPlugin
{
    /** @inheritdoc */
    public function register(EventHandler $controller)
    {
        $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'dokuwikiStarted');
    }

    public function dokuwikiStarted()
    {
        $param = [];
        Event::createAndTrigger('TESTING_PLUGIN_INSTALLED', $param);
        msg('The testing plugin is enabled and should be disabled.', -1);
    }
}