MediaWiki REL1_41
|
Handles the backend logic of blocking users. More...
Public Member Functions | |
__construct (ServiceOptions $options, BlockRestrictionStore $blockRestrictionStore, BlockPermissionCheckerFactory $blockPermissionCheckerFactory, BlockUtils $blockUtils, BlockActionInfo $blockActionInfo, HookContainer $hookContainer, DatabaseBlockStore $databaseBlockStore, UserFactory $userFactory, UserEditTracker $userEditTracker, LoggerInterface $logger, TitleFactory $titleFactory, TempUserConfig $tempUserConfig, $target, Authority $performer, string $expiry, string $reason, array $blockOptions, array $blockRestrictions, array $tags) | |
placeBlock (bool $reblock=false) | |
Place a block, checking permissions. | |
placeBlockUnsafe (bool $reblock=false) | |
Place a block without any sort of permissions checks. | |
setLogDeletionFlags (int $flags) | |
Static Public Member Functions | |
static | parseExpiryInput (string $expiry) |
Convert a submitted expiry time, which may be relative ("2 weeks", etc) or absolute ("24 May 2034", etc), into an absolute timestamp we can put into the database. | |
Public Attributes | |
const | CONSTRUCTOR_OPTIONS |
MediaWiki\Block\BlockUser::__construct | ( | ServiceOptions | $options, |
BlockRestrictionStore | $blockRestrictionStore, | ||
BlockPermissionCheckerFactory | $blockPermissionCheckerFactory, | ||
BlockUtils | $blockUtils, | ||
BlockActionInfo | $blockActionInfo, | ||
HookContainer | $hookContainer, | ||
DatabaseBlockStore | $databaseBlockStore, | ||
UserFactory | $userFactory, | ||
UserEditTracker | $userEditTracker, | ||
LoggerInterface | $logger, | ||
TitleFactory | $titleFactory, | ||
TempUserConfig | $tempUserConfig, | ||
$target, | |||
Authority | $performer, | ||
string | $expiry, | ||
string | $reason, | ||
array | $blockOptions, | ||
array | $blockRestrictions, | ||
array | $tags ) |
ServiceOptions | $options | |
BlockRestrictionStore | $blockRestrictionStore | |
BlockPermissionCheckerFactory | $blockPermissionCheckerFactory | |
BlockUtils | $blockUtils | |
BlockActionInfo | $blockActionInfo | |
HookContainer | $hookContainer | |
DatabaseBlockStore | $databaseBlockStore | |
UserFactory | $userFactory | |
UserEditTracker | $userEditTracker | |
LoggerInterface | $logger | |
TitleFactory | $titleFactory | |
TempUserConfig | $tempUserConfig | |
string | UserIdentity | $target | Target of the block |
Authority | $performer | Performer of the block |
string | $expiry | Expiry of the block (timestamp or 'infinity') |
string | $reason | Reason of the block |
bool[] | $blockOptions | Valid options:
|
AbstractRestriction[] | $blockRestrictions | |
string[] | $tags | Tags that should be assigned to the log entry |
Definition at line 212 of file BlockUser.php.
References MediaWiki\Config\ServiceOptions\assertRequiredOptions(), MediaWiki\MainConfigNames\BlockAllowsUTEdit, MediaWiki\Block\BlockPermissionCheckerFactory\newBlockPermissionChecker(), NS_USER_TALK, MediaWiki\Block\BlockUser\parseExpiryInput(), and MediaWiki\Block\Block\TYPE_USER.
|
static |
Convert a submitted expiry time, which may be relative ("2 weeks", etc) or absolute ("24 May 2034", etc), into an absolute timestamp we can put into the database.
string | $expiry | Whatever was typed into the form |
Definition at line 337 of file BlockUser.php.
References wfIsInfinity(), and wfTimestamp().
Referenced by MediaWiki\Block\BlockUser\__construct(), and MediaWiki\Specials\SpecialBlock\parseExpiryInput().
MediaWiki\Block\BlockUser::placeBlock | ( | bool | $reblock = false | ) |
Place a block, checking permissions.
bool | $reblock | Should this reblock? |
Definition at line 415 of file BlockUser.php.
MediaWiki\Block\BlockUser::placeBlockUnsafe | ( | bool | $reblock = false | ) |
Place a block without any sort of permissions checks.
bool | $reblock | Should this reblock? |
Definition at line 477 of file BlockUser.php.
MediaWiki\Block\BlockUser::setLogDeletionFlags | ( | int | $flags | ) |
int | $flags | One of LogPage::* constants |
Definition at line 321 of file BlockUser.php.
const MediaWiki\Block\BlockUser::CONSTRUCTOR_OPTIONS |
Definition at line 115 of file BlockUser.php.