function BlockRegion::create
Instantiates a new instance of the implementing class using autowiring.
Return value
static
Overrides PluginBase::create
File
-
core/
modules/ block/ src/ Plugin/ migrate/ process/ BlockRegion.php, line 45
Class
- BlockRegion
- Determines the region for a block.
Namespace
Drupal\block\Plugin\migrate\processCode
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
$regions = [];
foreach ($container->get('theme_handler')
->listInfo() as $key => $theme) {
$regions[$key] = $theme->info['regions'];
}
return new static($configuration, $plugin_id, $plugin_definition, $regions);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.