xref: /dokuwiki/inc/Action/Plugin.php (revision 316e3ee67cce340deac79a8c6f89d881b178d094)
1<?php
2
3namespace dokuwiki\Action;
4
5use dokuwiki\Extension\Event;
6
7/**
8 * Class Plugin
9 *
10 * Used to run action plugins
11 *
12 * @package dokuwiki\Action
13 */
14class Plugin extends AbstractAction
15{
16
17    /** @inheritdoc */
18    public function minimumPermission()
19    {
20        return AUTH_NONE;
21    }
22
23    /**
24     * Outputs nothing but a warning unless an action plugin overwrites it
25     *
26     * @inheritdoc
27     * @triggers TPL_ACT_UNKNOWN
28     */
29    public function tplContent()
30    {
31        $evt = new Event('TPL_ACT_UNKNOWN', $this->actionname);
32        if($evt->advise_before()) {
33            msg('Failed to handle action: ' . hsc($this->actionname), -1);
34        }
35        $evt->advise_after();
36    }
37}
38