function BlockLibraryController::__construct
Same name in other branches
- 9 core/modules/block/src/Controller/BlockLibraryController.php \Drupal\block\Controller\BlockLibraryController::__construct()
- 8.9.x core/modules/block/src/Controller/BlockLibraryController.php \Drupal\block\Controller\BlockLibraryController::__construct()
- 11.x core/modules/block/src/Controller/BlockLibraryController.php \Drupal\block\Controller\BlockLibraryController::__construct()
Constructs a BlockLibraryController object.
Parameters
\Drupal\Core\Block\BlockManagerInterface $block_manager: The block manager.
\Drupal\Core\Plugin\Context\LazyContextRepository $context_repository: The context repository.
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.
\Drupal\Core\Menu\LocalActionManagerInterface $local_action_manager: The local action manager.
File
-
core/
modules/ block/ src/ Controller/ BlockLibraryController.php, line 61
Class
- BlockLibraryController
- Provides a list of block plugins to be added to the layout.
Namespace
Drupal\block\ControllerCode
public function __construct(BlockManagerInterface $block_manager, LazyContextRepository $context_repository, RouteMatchInterface $route_match, LocalActionManagerInterface $local_action_manager) {
$this->blockManager = $block_manager;
$this->routeMatch = $route_match;
$this->localActionManager = $local_action_manager;
$this->contextRepository = $context_repository;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.