1f21dad39SAndreas Gohr<?php 2f21dad39SAndreas Gohr 3f21dad39SAndreas Gohrnamespace dokuwiki\Action; 4f21dad39SAndreas Gohr 5ab583a1bSAndreas Gohruse dokuwiki\Action\Exception\FatalException; 6f21dad39SAndreas Gohr 7ab583a1bSAndreas Gohr/** 8ab583a1bSAndreas Gohr * Class AbstractAliasAction 9ab583a1bSAndreas Gohr * 10ab583a1bSAndreas Gohr * An action that is an alias for another action. Skips the minimumPermission check 11ab583a1bSAndreas Gohr * 12ab583a1bSAndreas Gohr * Be sure to implement preProcess() and throw an ActionAbort exception 13ab583a1bSAndreas Gohr * with the proper action. 14ab583a1bSAndreas Gohr * 15ab583a1bSAndreas Gohr * @package dokuwiki\Action 16ab583a1bSAndreas Gohr */ 178c7c53b0SAndreas Gohrabstract class AbstractAliasAction extends AbstractAction 188c7c53b0SAndreas Gohr{ 19f21dad39SAndreas Gohr 20f21dad39SAndreas Gohr /** @inheritdoc */ 21*d868eb89SAndreas Gohr public function minimumPermission() 22*d868eb89SAndreas Gohr { 23f21dad39SAndreas Gohr return AUTH_NONE; 24f21dad39SAndreas Gohr } 25f21dad39SAndreas Gohr 2679a2d784SGerrit Uitslag /** 2779a2d784SGerrit Uitslag * @throws FatalException 2879a2d784SGerrit Uitslag */ 29*d868eb89SAndreas Gohr public function preProcess() 30*d868eb89SAndreas Gohr { 31ab583a1bSAndreas Gohr throw new FatalException('Alias Actions need to implement preProcess to load the aliased action'); 32ab583a1bSAndreas Gohr } 33f21dad39SAndreas Gohr} 34