function BlockLibraryController::create

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

Overrides AutowireTrait::create

File

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

Class

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

Namespace

Drupal\block\Controller

Code

public static function create(ContainerInterface $container) {
    return new static($container->get('plugin.manager.block'), $container->get('context.repository'), $container->get('current_route_match'), $container->get('plugin.manager.menu.local_action'));
}

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