Go to the documentation of this file.
25 use InvalidArgumentException;
90 # Do not introduce negative constants without changing BlockUser command object.
115 $options += $defaults;
168 return $this->reason->message->inLanguage( $language )->plain();
208 $this->mHideName = $hideName;
234 return wfSetVar( $this->blockCreateAccount, $x );
247 return wfSetVar( $this->mBlockEmail, $x );
260 return wfSetVar( $this->allowUsertalk, $x );
275 return $this->
getType() == self::TYPE_USER
293 $blockDisablesLogin =
$config->
get(
'BlockDisablesLogin' );
301 case 'createaccount':
318 if ( !
$res && $blockDisablesLogin ) {
323 $res = $permissionManager->userHasRight( $anon, $right ) ?
$res :
true;
395 $this->mExpiry = $expiry;
415 $this->mTimestamp = $timestamp;
423 list( $this->target, $this->type ) = static::parseTarget(
$target );
437 ->getBlockErrorFormatter()->getMessage(
443 return array_merge( [ [ $message->getKey() ], $message->getParams() ] );
475 if ( $this->target instanceof
User ) {
476 $usertalk = $this->target->getTalkPage();
478 throw new InvalidArgumentException(
479 '$usertalk must be provided if block target is not a user/IP'
485 throw new InvalidArgumentException(
486 '$usertalk must be a user talk page'
wfSetVar(&$dest, $source, $force=false)
Sets dest to source and returns the original value of dest If source is NULL, it just returns the val...
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
get( $name)
Get a configuration variable such as "Sitename" or "UploadMaintenance.".
Group all the pieces relevant to the context of a request into one instance @newable.
static getMain()
Get the RequestContext object associated with the main request.
Interface for objects which can provide a MediaWiki context on request.
Represents a title within MediaWiki.
The Message class deals with fetching and processing of interface message into a variety of formats.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...