xref: /dokuwiki/inc/Action/AbstractAliasAction.php (revision ab583a1bc44ef1ef3b917647fc361aabd055c2ac)
1f21dad39SAndreas Gohr<?php
2f21dad39SAndreas Gohr
3f21dad39SAndreas Gohrnamespace dokuwiki\Action;
4f21dad39SAndreas Gohr
5*ab583a1bSAndreas Gohruse dokuwiki\Action\Exception\FatalException;
6f21dad39SAndreas Gohr
7*ab583a1bSAndreas Gohr/**
8*ab583a1bSAndreas Gohr * Class AbstractAliasAction
9*ab583a1bSAndreas Gohr *
10*ab583a1bSAndreas Gohr * An action that is an alias for another action. Skips the minimumPermission check
11*ab583a1bSAndreas Gohr *
12*ab583a1bSAndreas Gohr * Be sure to implement preProcess() and throw an ActionAbort exception
13*ab583a1bSAndreas Gohr * with the proper action.
14*ab583a1bSAndreas Gohr *
15*ab583a1bSAndreas Gohr * @package dokuwiki\Action
16*ab583a1bSAndreas Gohr */
17f21dad39SAndreas Gohrabstract class AbstractAliasAction extends AbstractAction {
18f21dad39SAndreas Gohr
19f21dad39SAndreas Gohr    /** @inheritdoc */
20f21dad39SAndreas Gohr    function minimumPermission() {
21f21dad39SAndreas Gohr        return AUTH_NONE;
22f21dad39SAndreas Gohr    }
23f21dad39SAndreas Gohr
24*ab583a1bSAndreas Gohr    public function preProcess() {
25*ab583a1bSAndreas Gohr        throw new FatalException('Alias Actions need to implement preProcess to load the aliased action');
26*ab583a1bSAndreas Gohr    }
27*ab583a1bSAndreas Gohr
28f21dad39SAndreas Gohr}
29