public function DashboardBlock::__construct in Dashboards with Layout Builder 8
Same name in this branch
- 8 src/Plugin/Derivative/DashboardBlock.php \Drupal\dashboards\Plugin\Derivative\DashboardBlock::__construct()
- 8 src/Plugin/Block/DashboardBlock.php \Drupal\dashboards\Plugin\Block\DashboardBlock::__construct()
Same name and namespace in other branches
- 2.0.x src/Plugin/Block/DashboardBlock.php \Drupal\dashboards\Plugin\Block\DashboardBlock::__construct()
Overrides BlockPluginTrait::__construct
File
- src/
Plugin/ Block/ DashboardBlock.php, line 34
Class
- DashboardBlock
- Provides a dashboard block.
Namespace
Drupal\dashboards\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, PluginManagerInterface $plugin_manager) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$id = explode(':', $this
->getDerivativeId())[1];
$this->basePlugin = $plugin_manager
->createInstance($id);
}