3 namespace MediaWiki\Specials;
29 parent::__construct(
'LinkAccounts' );
57 $titleMessage = $this->
msg(
'cannotlink-no-provider-title' );
58 $errorMessage = $this->
msg(
'cannotlink-no-provider' );
73 if ( $status ===
false || !$status->isOK() ) {
78 $response = $status->getValue();
80 switch ( $response->status ) {
89 $this->
getOutput()->redirect( $response->redirectTarget );
93 $this->authRequests = $response->neededRequests;
97 throw new LogicException(
'invalid AuthenticationResponse' );
111 $form = parent::getAuthForm( $requests, $action );
112 $form->setSubmitTextMsg(
'linkaccounts-submit' );
128 class_alias( SpecialLinkAccounts::class,
'SpecialLinkAccounts' );
An error page which can definitely be safely rendered using the OutputPage.
A class containing constants representing the names of configuration variables.
const ChangeCredentialsBlacklist
Name constant for the ChangeCredentialsBlacklist setting, for use with Config::get()
A special page subclass for authentication-related special pages.
string $subPage
Subpage of the special page.
displayForm( $status)
Display the form.
isActionAllowed( $action)
Checks whether AuthManager is ready to perform the action.
trySubmit()
Attempts to do an authentication step with the submitted data.
loadAuth( $subPage, $authAction=null, $reset=false)
Load or initialize $authAction, $authRequests and $subPage.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
setAuthManager(AuthManager $authManager)
Set the injected AuthManager from the special page constructor.
getPageTitle( $subpage=false)
Get a self-referential title object.
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.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
Generic operation result class Has warning/error list, boolean status and arbitrary value.
static newFatal( $message,... $parameters)
Factory function for fatal errors.