function ChooseBlockController::create

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

Overrides ContainerInjectionInterface::create

File

core/modules/layout_builder/src/Controller/ChooseBlockController.php, line 70

Class

ChooseBlockController
Defines a controller to choose a new block.

Namespace

Drupal\layout_builder\Controller

Code

public static function create(ContainerInterface $container) {
    return new static($container->get('plugin.manager.block'), $container->get('entity_type.manager'), $container->get('current_user'));
}

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