MediaWiki REL1_39
|
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, $target, Authority $performer, string $expiry, string $reason, array $blockOptions, array $blockRestrictions, array $tags) | |
placeBlock (bool $reblock=false) | |
Places a block with checking permissions. | |
placeBlockUnsafe (bool $reblock=false) | |
Places 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, | ||
$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 | |
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:
|
array | $blockRestrictions | |
string[] | $tags | Tags that should be assigned to the log entry |
Definition at line 207 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 336 of file BlockUser.php.
References wfIsInfinity(), and wfTimestamp().
Referenced by MediaWiki\Block\BlockUser\__construct().
MediaWiki\Block\BlockUser::placeBlock | ( | bool | $reblock = false | ) |
Places a block with checking permissions.
bool | $reblock | Should this reblock? |
Definition at line 414 of file BlockUser.php.
MediaWiki\Block\BlockUser::placeBlockUnsafe | ( | bool | $reblock = false | ) |
Places 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 320 of file BlockUser.php.
const MediaWiki\Block\BlockUser::CONSTRUCTOR_OPTIONS |
Definition at line 111 of file BlockUser.php.