xref: /dokuwiki/lib/plugins/testing/action.php (revision 8c7c53b0321a3cd3116b8d3b2ad27863a38dece7)
1f693efbcSTobias Sarnowski<?php
2cbb44eabSAndreas Gohr
38553d24dSAndreas Gohruse dokuwiki\Extension\ActionPlugin;
48553d24dSAndreas Gohruse dokuwiki\Extension\EventHandler;
5cbb44eabSAndreas Gohruse dokuwiki\Extension\Event;
6cbb44eabSAndreas Gohr
723684d4aSAndreas Gohr/**
823684d4aSAndreas Gohr * Plugin for testing the test system
923684d4aSAndreas Gohr *
1023684d4aSAndreas Gohr * This plugin doesn't really do anything and should always be disabled
1123684d4aSAndreas Gohr *
1223684d4aSAndreas Gohr * @author Tobias Sarnowski <tobias@trustedco.de>
1323684d4aSAndreas Gohr */
14*8c7c53b0SAndreas Gohrclass action_plugin_testing extends ActionPlugin
15*8c7c53b0SAndreas Gohr{
16e8b5a4f9SAndreas Gohr
173dc2d50cSAndreas Gohr    /** @inheritdoc */
188553d24dSAndreas Gohr    public function register(EventHandler $controller) {
19f693efbcSTobias Sarnowski        $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'dokuwikiStarted');
20f693efbcSTobias Sarnowski    }
21f693efbcSTobias Sarnowski
223dc2d50cSAndreas Gohr    public function dokuwikiStarted() {
2354cc7aa4SAndreas Gohr        $param = [];
24cbb44eabSAndreas Gohr        Event::createAndTrigger('TESTING_PLUGIN_INSTALLED', $param);
2523684d4aSAndreas Gohr        msg('The testing plugin is enabled and should be disabled.', -1);
26f693efbcSTobias Sarnowski    }
27f693efbcSTobias Sarnowski}
28