43 parent::__construct(
'TalkPage' );
44 $this->config = $config;
45 $this->titleParser = $titleParser;
53 'label-message' =>
'special-talkpage-target',
67 $target = $formData[
'target'];
69 $title = $this->titleParser->parseTitle( $target );
73 $title = Title::newFromLinkTarget( $title );
74 $talk = $title->getTalkPageIfDefined();
75 if ( $talk ===
null ) {
76 return Status::newFatal(
'title-invalid-talk-namespace' );
80 $this->
getOutput()->redirect( $talk->getFullUrlForRedirect(),
'302' );
105 return 'special-talkpage';
110 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.
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.
requiresUnblock()
Whether this action cannot be executed by a blocked user, default to requiresPost()
__construct(Config $config, TitleParser $titleParser)
getDescription()
Returns the name that goes in the <h1> in the special page itself, and also the name that will be l...
getDisplayFormat()
Get display format for the form.
getFormFields()
Get an HTMLForm descriptor array.
getMessagePrefix()
Get message prefix for HTMLForm.
requiresWrite()
Whether this action requires the wiki not to be locked, default to requiresPost()
onSubmit(array $formData)
Process the form on submission.