28 private $searchEngineFactory;
45 parent::__construct( $name );
48 $this->searchEngineFactory = $searchEngineFactory;
55 if ( $subpage ===
null || $subpage ===
'' ) {
58 $this->mAddedRedirectParams[
'title'] = $subpage;
72 private function showForm() {
77 $form = HTMLForm::factory(
'ooui', [
81 'label-message' =>
'special' . $this->msgPrefix .
'-page',
86 $form->setSubmitTextMsg(
'special' . $this->msgPrefix .
'-submit' );
97 $title = $formData[
'page'];
98 $page = Title::newFromText( $title );
100 $url = $page->getFullUrlForRedirect( $query );
121 return $this->
prefixSearchString( $search, $limit, $offset, $this->searchEngineFactory );
134class_alias( SpecialRedirectWithAction::class,
'SpecialRedirectWithAction' );
Shortcut to construct a special page alias.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getContext()
Gets the context this SpecialPage is executed in.
getOutput()
Get the OutputPage being used for this instance.
prefixSearchString( $search, $limit, $offset, ?SearchEngineFactory $searchEngineFactory=null)
Perform a regular substring search for prefixSearchSubpages.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages By default the message key is the canonical name of...
Abstract to simplify creation of redirect special pages.
__construct( $name, $action, $msgPrefix, SearchEngineFactory $searchEngineFactory)
getRedirect( $subpage)
If the special page is a redirect, then get the Title object it redirects to.False otherwise....
prefixSearchSubpages( $search, $limit, $offset)
Return an array of subpages beginning with $search that this special page will accept.