27 parent::__construct(
'TalkPage' );
28 $this->titleParser = $titleParser;
37 'label-message' =>
'special-talkpage-target',
52 $target = $formData[
'target'];
54 $title = $this->titleParser->parseTitle( $target );
58 $title = Title::newFromLinkTarget( $title );
59 $talk = $title->getTalkPageIfDefined();
60 if ( $talk ===
null ) {
61 return Status::newFatal(
'title-invalid-talk-namespace' );
65 $this->
getOutput()->redirect( $talk->getFullUrlForRedirect(),
'302' );
95 return 'special-talkpage';
101 return $this->
msg(
'special-talkpage' );
A class containing constants representing the names of configuration variables.
const ParserCacheExpireTime
Name constant for the ParserCacheExpireTime setting, for use with Config::get()
Special page which uses an HTMLForm to handle processing.
string null $par
The subpage of the special page.
getConfig()
Shortcut to get main config object.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
Redirect to the talk page of a given page.
alterForm(HTMLForm $form)
Play with the HTMLForm if you need to more substantially.
isListed()
Whether this special page is listed in Special:SpecialPages.to override 1.3 (r3583) bool
requiresUnblock()
Whether this action cannot be executed by a blocked user, default to requiresPost()bool
getDescription()
Returns the name that goes in the <h1> in the special page itself, and also the name that will be l...
__construct(TitleParser $titleParser)
getDisplayFormat()
Get display format for the form.See HTMLForm documentation for available values.1....
getFormFields()
Get an HTMLForm descriptor array.array
getMessagePrefix()
Get message prefix for HTMLForm.1.21 string
requiresWrite()
Whether this action requires the wiki not to be locked, default to requiresPost()bool
onSubmit(array $formData)
Process the form on submission.bool|string|array|Status As documented for HTMLForm::trySubmit.