BlockAccessControlHandler::__construct

public BlockAccessControlHandler::__construct(EntityTypeInterface $entity_type, ExecutableManagerInterface $manager, ContextHandlerInterface $context_handler, ContextRepositoryInterface $context_repository)

Constructs the block access control handler instance

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.

\Drupal\Core\Executable\ExecutableManagerInterface $manager: The ConditionManager for checking visibility of blocks.

\Drupal\Core\Plugin\Context\ContextHandlerInterface $context_handler: The ContextHandler for applying contexts to conditions properly.

\Drupal\Core\Plugin\Context\ContextRepositoryInterface $context_repository: The lazy context repository service.

Overrides EntityAccessControlHandler::__construct

File

core/modules/block/src/BlockAccessControlHandler.php, line 75

Class

BlockAccessControlHandler
Defines the access control handler for the block entity type.

Namespace

Drupal\block

Code

public function __construct(EntityTypeInterface $entity_type, ExecutableManagerInterface $manager, ContextHandlerInterface $context_handler, ContextRepositoryInterface $context_repository) {
  parent::__construct($entity_type);
  $this->manager = $manager;
  $this->contextHandler = $context_handler;
  $this->contextRepository = $context_repository;
}
doc_Drupal
2016-10-29 08:46:32
Comments
Leave a Comment

Please login to continue.