You are here

private function DraggableBlock::getDashboard in Draggable dashboard 8.2

Gets the current dashboard entity.

Return value

\Drupal\Core\Entity\EntityInterface|null

2 calls to DraggableBlock::getDashboard()
DraggableBlock::build in src/Plugin/Block/DraggableBlock.php
Builds and returns the renderable array for this block plugin.
DraggableBlock::getCacheTags in src/Plugin/Block/DraggableBlock.php
The cache tags associated with this object.

File

src/Plugin/Block/DraggableBlock.php, line 129

Class

DraggableBlock
Provides a draggable block with a simple text.

Namespace

Drupal\draggable_dashboard\Plugin\Block

Code

private function getDashboard() {
  $dashboard_id = str_replace('draggable_dashboard_block:draggable_dashboard_', '', $this
    ->getConfiguration()['id']);
  return $this->entityTypeManager
    ->getStorage('dashboard_entity')
    ->load($dashboard_id);
}