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 /** @inheritdoc */ 20*d868eb89SAndreas Gohr public function minimumPermission() 21*d868eb89SAndreas Gohr { 22f21dad39SAndreas Gohr return AUTH_NONE; 23f21dad39SAndreas Gohr } 24f21dad39SAndreas Gohr 2579a2d784SGerrit Uitslag /** 2679a2d784SGerrit Uitslag * @throws FatalException 2779a2d784SGerrit Uitslag */ 28*d868eb89SAndreas Gohr public function preProcess() 29*d868eb89SAndreas Gohr { 30ab583a1bSAndreas Gohr throw new FatalException('Alias Actions need to implement preProcess to load the aliased action'); 31ab583a1bSAndreas Gohr } 32f21dad39SAndreas Gohr} 33