44 parent::__construct(
'NewSection' );
45 $this->mAllowedRedirectParams = [
'preloadtitle',
'nosummary',
'editintro',
46 'preload',
'preloadparams',
'summary' ];
47 $this->searchEngineFactory = $searchEngineFactory;
54 if ( $subpage ===
null || $subpage ===
'' ) {
57 $this->mAddedRedirectParams[
'title'] = $subpage;
58 $this->mAddedRedirectParams[
'action'] =
'edit';
59 $this->mAddedRedirectParams[
'section'] =
'new';
70 private function showForm() {
71 $form = HTMLForm::factory(
'ooui', [
75 'label-message' =>
'newsection-page',
80 $form->setSubmitTextMsg(
'newsection-submit' );
81 $form->setSubmitCallback( [ $this,
'onFormSubmit' ] );
86 $title = $formData[
'page'];
87 $page = Title::newFromTextThrow( $title );
88 $query = [
'action' =>
'edit',
'section' =>
'new' ];
89 $url = $page->getFullUrlForRedirect( $query );
106 return $this->
prefixSearchString( $search, $limit, $offset, $this->searchEngineFactory );
118class_alias( SpecialNewSection::class,
'SpecialNewSection' );
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 By default the message key is the canonical name of...
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
Factory class for SearchEngine.