MediaWiki  master
BlockPermissionCheckerFactory.php
Go to the documentation of this file.
1 <?php
2 
22 namespace MediaWiki\Block;
23 
27 use User;
28 
35 
37  private $options;
38 
41 
46 
51  public function __construct(
54  ) {
55  $options->assertRequiredOptions( self::CONSTRUCTOR_OPTIONS );
56  $this->options = $options;
57  $this->permissionManager = $permissionManager;
58  }
59 
66  public function newBlockPermissionChecker(
67  $target,
68  User $performer
69  ) {
70  return new BlockPermissionChecker(
71  $this->options,
72  $this->permissionManager,
73  $target,
74  $performer
75  );
76  }
77 }
MediaWiki\Block\BlockPermissionCheckerFactory
Factory class for BlockPermissionChecker.
Definition: BlockPermissionCheckerFactory.php:34
MediaWiki\Block
Definition: AbstractBlock.php:21
MediaWiki\Block\BlockPermissionCheckerFactory\CONSTRUCTOR_OPTIONS
const CONSTRUCTOR_OPTIONS
Definition: BlockPermissionCheckerFactory.php:45
MediaWiki\User\UserIdentity
Interface for objects representing user identity.
Definition: UserIdentity.php:32
MediaWiki\Config\ServiceOptions
A class for passing options to services.
Definition: ServiceOptions.php:27
MediaWiki\Block\BlockPermissionChecker\CONSTRUCTOR_OPTIONS
const CONSTRUCTOR_OPTIONS
Definition: BlockPermissionChecker.php:58
MediaWiki\Block\BlockPermissionChecker
Block permissions.
Definition: BlockPermissionChecker.php:39
MediaWiki\Permissions\PermissionManager
A service class for checking permissions To obtain an instance, use MediaWikiServices::getInstance()-...
Definition: PermissionManager.php:51
MediaWiki\Block\BlockPermissionCheckerFactory\__construct
__construct(ServiceOptions $options, PermissionManager $permissionManager)
Definition: BlockPermissionCheckerFactory.php:51
MediaWiki\Block\BlockPermissionCheckerFactory\newBlockPermissionChecker
newBlockPermissionChecker( $target, User $performer)
Definition: BlockPermissionCheckerFactory.php:66
MediaWiki\Block\BlockPermissionCheckerFactory\$options
ServiceOptions $options
Definition: BlockPermissionCheckerFactory.php:37
User
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition: User.php:63
MediaWiki\Config\ServiceOptions\assertRequiredOptions
assertRequiredOptions(array $expectedKeys)
Assert that the list of options provided in this instance exactly match $expectedKeys,...
Definition: ServiceOptions.php:66
MediaWiki\Block\BlockPermissionCheckerFactory\$permissionManager
PermissionManager $permissionManager
Definition: BlockPermissionCheckerFactory.php:40