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