You are here

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

Same name and namespace in other branches
  1. 8 src/Plugin/SectionStorage/DashboardSectionStorage.php \Drupal\dashboards\Plugin\SectionStorage\DashboardSectionStorage::getRedirectUrl()

Gets the URL used when redirecting away from the Layout Builder UI.

Return value

\Drupal\Core\Url The URL object.

Overrides SectionStorageInterface::getRedirectUrl

File

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

Class

DashboardSectionStorage
Dashboard section storage.

Namespace

Drupal\dashboards\Plugin\SectionStorage

Code

public function getRedirectUrl() {
  return Url::fromRoute('entity.dashboard.canonical', [
    'dashboard' => $this
      ->getDashboard()
      ->id(),
  ]);
}