MediaWiki master
|
A block target for a registered user. More...
Inherits MediaWiki\Block\BlockTarget, and MediaWiki\Block\BlockTargetWithUserPage.
Public Member Functions | |
__construct (UserIdentity $userIdentity) | |
getLogPage () | |
Get the title to be used when logging an action on this block. | |
getSpecificity () | |
Get the score of this block for purposes of choosing a more specific block, where lower is more specific. | |
getType () | |
Get one of the Block::TYPE_xxx constants associated with this target. | |
getUserIdentity () | |
Get a UserIdentity associated with this target. | |
getUserPage () | |
Get the target's user page. | |
toString () | |
Get the username, the IP address, range, or autoblock ID prefixed with a "#". | |
validateForCreation () | |
Check the target data against more stringent requirements imposed when a block is created from user input. | |
![]() | |
__toString () | |
equals (?BlockTarget $other) | |
Compare this object with another one. | |
getLegacyTuple () | |
Get the target and type tuple conventionally returned by BlockUtils::parseBlockTarget() | |
getWikiId () | |
Get the ID of the wiki this page belongs to. | |
![]() | |
assertWiki ( $wikiId) | |
Throws if $wikiId is different from the return value of getWikiId(). | |
Protected Member Functions | |
getLegacyUnion () | |
Get the first part of the legacy tuple. | |
![]() | |
__construct ( $wikiId) | |
Additional Inherited Members | |
![]() | |
string false | $wikiId |
MediaWiki\Block\UserBlockTarget::__construct | ( | UserIdentity | $userIdentity | ) |
Definition at line 18 of file UserBlockTarget.php.
References MediaWiki\DAO\WikiAwareEntity\getWikiId().
|
protected |
Get the first part of the legacy tuple.
Reimplemented from MediaWiki\Block\BlockTarget.
Definition at line 57 of file UserBlockTarget.php.
MediaWiki\Block\UserBlockTarget::getLogPage | ( | ) |
Get the title to be used when logging an action on this block.
For an autoblock, the title is technically invalid, with a hash character in the DB key. For a range block, the title is valid but is not a user page for a specific user.
See also getUserPage(), which exists only for subclasses which relate to a specific user with a talk page.
Reimplemented from MediaWiki\Block\BlockTarget.
Definition at line 35 of file UserBlockTarget.php.
MediaWiki\Block\UserBlockTarget::getSpecificity | ( | ) |
Get the score of this block for purposes of choosing a more specific block, where lower is more specific.
Reimplemented from MediaWiki\Block\BlockTarget.
Definition at line 31 of file UserBlockTarget.php.
MediaWiki\Block\UserBlockTarget::getType | ( | ) |
Get one of the Block::TYPE_xxx constants associated with this target.
Reimplemented from MediaWiki\Block\BlockTarget.
Definition at line 27 of file UserBlockTarget.php.
MediaWiki\Block\UserBlockTarget::getUserIdentity | ( | ) |
Get a UserIdentity associated with this target.
Implements MediaWiki\Block\BlockTargetWithUserIdentity.
Definition at line 43 of file UserBlockTarget.php.
MediaWiki\Block\UserBlockTarget::getUserPage | ( | ) |
Get the target's user page.
The page has an associated talk page which can be used to talk to the target.
Implements MediaWiki\Block\BlockTargetWithUserPage.
Definition at line 39 of file UserBlockTarget.php.
MediaWiki\Block\UserBlockTarget::toString | ( | ) |
Get the username, the IP address, range, or autoblock ID prefixed with a "#".
Such a string will round-trip through BlockTarget::newFromString(), giving back the same target.
Reimplemented from MediaWiki\Block\BlockTarget.
Definition at line 23 of file UserBlockTarget.php.
MediaWiki\Block\UserBlockTarget::validateForCreation | ( | ) |
Check the target data against more stringent requirements imposed when a block is created from user input.
This is in addition to the loose validation done by BlockTargetFactory::newFromString().
Reimplemented from MediaWiki\Block\BlockTarget.
Definition at line 47 of file UserBlockTarget.php.
References wfEscapeWikiText().