MediaWiki master
MediaWiki\Block\UserBlockCommandFactory Class Reference

Inherits MediaWiki\Block\BlockUserFactory, and MediaWiki\Block\UnblockUserFactory.

Collaboration diagram for MediaWiki\Block\UserBlockCommandFactory:

Public Member Functions

 __construct (ServiceOptions $options, HookContainer $hookContainer, BlockPermissionCheckerFactory $blockPermissionCheckerFactory, BlockUtils $blockUtils, DatabaseBlockStore $blockStore, BlockRestrictionStore $blockRestrictionStore, UserFactory $userFactory, UserEditTracker $userEditTracker, LoggerInterface $logger, TitleFactory $titleFactory, BlockActionInfo $blockActionInfo)
 
 newBlockUser ( $target, Authority $performer, string $expiry, string $reason='', array $blockOptions=[], array $blockRestrictions=[], $tags=[])
 Create BlockUser.
 
 newRemoveBlock (DatabaseBlock $block, Authority $performer, string $reason, array $tags=[])
 Creates UnblockUser to remove a specific block.
 
 newUnblockUser ( $target, Authority $performer, string $reason, array $tags=[])
 Creates UnblockUser.
 
 newUpdateBlock (DatabaseBlock $block, Authority $performer, string $expiry, string $reason='', array $blockOptions=[], array $blockRestrictions=[], $tags=[])
 Create a BlockUser which updates a specified block.
 

Public Attributes

const CONSTRUCTOR_OPTIONS = BlockUser::CONSTRUCTOR_OPTIONS
 

Detailed Description

Definition at line 33 of file UserBlockCommandFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Block\UserBlockCommandFactory::__construct ( ServiceOptions $options,
HookContainer $hookContainer,
BlockPermissionCheckerFactory $blockPermissionCheckerFactory,
BlockUtils $blockUtils,
DatabaseBlockStore $blockStore,
BlockRestrictionStore $blockRestrictionStore,
UserFactory $userFactory,
UserEditTracker $userEditTracker,
LoggerInterface $logger,
TitleFactory $titleFactory,
BlockActionInfo $blockActionInfo )

Member Function Documentation

◆ newBlockUser()

MediaWiki\Block\UserBlockCommandFactory::newBlockUser ( $target,
Authority $performer,
string $expiry,
string $reason = '',
array $blockOptions = [],
array $blockRestrictions = [],
$tags = [] )

Create BlockUser.

Parameters
string | UserIdentity$targetTarget of the block
Authority$performerPerformer of the block
string$expiryExpiry of the block (timestamp or 'infinity')
string$reasonReason of the block
array$blockOptions
array$blockRestrictions
array | null$tagsTags that should be assigned to the log entry
Returns
BlockUser

Implements MediaWiki\Block\BlockUserFactory.

Definition at line 92 of file UserBlockCommandFactory.php.

◆ newRemoveBlock()

MediaWiki\Block\UserBlockCommandFactory::newRemoveBlock ( DatabaseBlock $block,
Authority $performer,
string $reason,
array $tags = [] )

Creates UnblockUser to remove a specific block.

Parameters
DatabaseBlock$block
Authority$performer
string$reason
array$tags
Returns
UnblockUser

Implements MediaWiki\Block\UnblockUserFactory.

Definition at line 212 of file UserBlockCommandFactory.php.

◆ newUnblockUser()

MediaWiki\Block\UserBlockCommandFactory::newUnblockUser ( $target,
Authority $performer,
string $reason,
array $tags = [] )

Creates UnblockUser.

Since
1.44
Parameters
UserIdentity | string$target
Authority$performer
string$reason
string[]$tags
Returns
UnblockUser

Implements MediaWiki\Block\UnblockUserFactory.

Definition at line 182 of file UserBlockCommandFactory.php.

◆ newUpdateBlock()

MediaWiki\Block\UserBlockCommandFactory::newUpdateBlock ( DatabaseBlock $block,
Authority $performer,
string $expiry,
string $reason = '',
array $blockOptions = [],
array $blockRestrictions = [],
$tags = [] )

Create a BlockUser which updates a specified block.

Since
1.44
Parameters
DatabaseBlock$block
Authority$performerPerformer of the block
string$expiryNew expiry of the block (timestamp or 'infinity')
string$reasonReason of the block
array$blockOptions
array$blockRestrictions
array | null$tagsTags that should be assigned to the log entry
Returns
BlockUser

Implements MediaWiki\Block\BlockUserFactory.

Definition at line 138 of file UserBlockCommandFactory.php.

Member Data Documentation

◆ CONSTRUCTOR_OPTIONS

const MediaWiki\Block\UserBlockCommandFactory::CONSTRUCTOR_OPTIONS = BlockUser::CONSTRUCTOR_OPTIONS
Access: internal
Use only in ServiceWiring

Definition at line 49 of file UserBlockCommandFactory.php.


The documentation for this class was generated from the following file: