function BlockLibraryController::__construct

Same name and namespace in other branches
  1. 11.x core/modules/block/src/Controller/BlockLibraryController.php \Drupal\block\Controller\BlockLibraryController::__construct()
  2. 10 core/modules/block/src/Controller/BlockLibraryController.php \Drupal\block\Controller\BlockLibraryController::__construct()
  3. 9 core/modules/block/src/Controller/BlockLibraryController.php \Drupal\block\Controller\BlockLibraryController::__construct()
  4. 8.9.x core/modules/block/src/Controller/BlockLibraryController.php \Drupal\block\Controller\BlockLibraryController::__construct()

Constructs a BlockLibraryController object.

Parameters

\Drupal\Core\Block\BlockManagerInterface $blockManager: The block manager.

\Drupal\Core\Plugin\Context\ContextRepositoryInterface $contextRepository: The context repository.

\Drupal\Core\Routing\RouteMatchInterface $routeMatch: The current route match.

\Drupal\Core\Menu\LocalActionManagerInterface $localActionManager: The local action manager.

File

core/modules/block/src/Controller/BlockLibraryController.php, line 34

Class

BlockLibraryController
Provides a list of block plugins to be added to the layout.

Namespace

Drupal\block\Controller

Code

public function __construct(protected BlockManagerInterface $blockManager, protected ContextRepositoryInterface $contextRepository, protected RouteMatchInterface $routeMatch, protected LocalActionManagerInterface $localActionManager) {
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.