xref: /dokuwiki/lib/plugins/testing/action.php (revision 8553d24d33ab5f260c6e19959de764dd8472d438)
1f693efbcSTobias Sarnowski<?php
2cbb44eabSAndreas Gohr
3*8553d24dSAndreas Gohruse dokuwiki\Extension\ActionPlugin;
4*8553d24dSAndreas 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*8553d24dSAndreas Gohrclass action_plugin_testing extends ActionPlugin {
15e8b5a4f9SAndreas Gohr
163dc2d50cSAndreas Gohr    /** @inheritdoc */
17*8553d24dSAndreas Gohr    public function register(EventHandler $controller) {
18f693efbcSTobias Sarnowski        $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'dokuwikiStarted');
19f693efbcSTobias Sarnowski    }
20f693efbcSTobias Sarnowski
213dc2d50cSAndreas Gohr    public function dokuwikiStarted() {
2254cc7aa4SAndreas Gohr        $param = [];
23cbb44eabSAndreas Gohr        Event::createAndTrigger('TESTING_PLUGIN_INSTALLED', $param);
2423684d4aSAndreas Gohr        msg('The testing plugin is enabled and should be disabled.',-1);
25f693efbcSTobias Sarnowski    }
26f693efbcSTobias Sarnowski}
27