function BlockContentController::create

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

Overrides ControllerBase::create

File

core/modules/block_content/src/Controller/BlockContentController.php, line 39

Class

BlockContentController

Namespace

Drupal\block_content\Controller

Code

public static function create(ContainerInterface $container) {
    $entity_type_manager = $container->get('entity_type.manager');
    return new static($entity_type_manager->getStorage('block_content'), $entity_type_manager->getStorage('block_content_type'), $container->get('theme_handler'));
}

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