42 parent::__construct(
'NewSection' );
43 $this->mAllowedRedirectParams = [
'preloadtitle',
'nosummary',
'editintro',
44 'preload',
'preloadparams',
'summary' ];
45 $this->searchEngineFactory = $searchEngineFactory;
52 if ( $subpage ===
null || $subpage ===
'' ) {
55 $this->mAddedRedirectParams[
'title'] = $subpage;
56 $this->mAddedRedirectParams[
'action'] =
'edit';
57 $this->mAddedRedirectParams[
'section'] =
'new';
68 private function showForm() {
69 $form = HTMLForm::factory(
'ooui', [
73 'label-message' =>
'newsection-page',
78 $form->setSubmitTextMsg(
'newsection-submit' );
79 $form->setSubmitCallback( [ $this,
'onFormSubmit' ] );
84 $title = $formData[
'page'];
85 $page = Title::newFromTextThrow( $title );
86 $query = [
'action' =>
'edit',
'section' =>
'new' ];
87 $url = $page->getFullUrlForRedirect( $query );
104 return $this->
prefixSearchString( $search, $limit, $offset, $this->searchEngineFactory );
116class_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 Per default the message key is the canonical name o...
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
Factory class for SearchEngine.