44 private $searchEngineFactory;
61 parent::__construct( $name );
64 if ( !$searchEngineFactory ) {
66 wfDeprecated( __METHOD__ .
' without providing SearchEngineFactory',
'1.39' );
69 $this->searchEngineFactory = $searchEngineFactory;
76 if ( $subpage ===
null || $subpage ===
'' ) {
79 $this->mAddedRedirectParams[
'title'] = $subpage;
93 private function showForm() {
98 $form = HTMLForm::factory(
'ooui', [
102 'label-message' =>
'special' . $this->msgPrefix .
'-page',
106 $form->setSubmitTextMsg(
'special' . $this->msgPrefix .
'-submit' );
107 $form->setSubmitCallback( [ $this,
'onFormSubmit' ] );
119 $title = $formData[
'page'];
121 $page = Title::newFromTextThrow( $title );
126 $url = $page->getFullUrlForRedirect( $query );
147 return $this->
prefixSearchString( $search, $limit, $offset, $this->searchEngineFactory );
160class_alias( SpecialRedirectWithAction::class,
'SpecialRedirectWithAction' );
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
Shortcut to construct a special page alias.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
prefixSearchString( $search, $limit, $offset, SearchEngineFactory $searchEngineFactory=null)
Perform a regular substring search for prefixSearchSubpages.
getContext()
Gets the context this SpecialPage is executed in.
getOutput()
Get the OutputPage being used for this instance.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
getRedirect( $subpage)
If the special page is a redirect, then get the Title object it redirects to.False otherwise....
__construct( $name, $action, $msgPrefix, SearchEngineFactory $searchEngineFactory=null)
prefixSearchSubpages( $search, $limit, $offset)
Return an array of subpages beginning with $search that this special page will accept.
Factory class for SearchEngine.