You are here

public function DashboardSectionStorage::getDefaultDashboard in Dashboards with Layout Builder 2.0.x

Gets the dashboard entity.

Return value

\Drupal\dashboards\Entity\Dashboard Dashboard entity.

Throws

\Drupal\Component\Plugin\Exception\PluginException

File

src/Plugin/SectionStorage/DashboardSectionStorage.php, line 155

Class

DashboardSectionStorage
Dashboard section storage.

Namespace

Drupal\dashboards\Plugin\SectionStorage

Code

public function getDefaultDashboard() : Dashboard {
  return $this->entityTypeManager
    ->getStorage('dashboard')
    ->load($this
    ->getDashboard()
    ->id());
}