public function DashboardBlock::build in Dashboards with Layout Builder 2.0.x
Same name and namespace in other branches
- 8 src/Plugin/Block/DashboardBlock.php \Drupal\dashboards\Plugin\Block\DashboardBlock::build()
Set if this block is in preview.
Overrides BlockPluginInterface::build
File
- src/
Plugin/ Block/ DashboardBlock.php, line 86
Class
- DashboardBlock
- Provides a dashboard block.
Namespace
Drupal\dashboards\Plugin\BlockCode
public function build() {
return [
'#type' => 'container',
'#attached' => [
'library' => [
'dashboards/component',
],
],
'#attributes' => [
'class' => [
'dashboard-component',
],
],
'content' => $this->basePlugin
->buildRenderArray($this
->getConfiguration()),
];
}