function PlaceBlock::create
Overrides ContainerFactoryPluginInterface::create
File
-
core/
modules/ block/ src/ Plugin/ ConfigAction/ PlaceBlock.php, line 42
Class
- PlaceBlock
- Places a block in either the admin or default theme.
Namespace
Drupal\block\Plugin\ConfigActionCode
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($container->get('plugin.manager.config_action')
->createInstance('entity_create:createIfNotExists'), $plugin_definition['which_theme'], $container->get(ConfigFactoryInterface::class), $container->get(EntityTypeManagerInterface::class)
->getStorage('block'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.