public function DashboardSectionStorage::getLayoutBuilderUrl in Dashboards with Layout Builder 2.0.x
Same name and namespace in other branches
- 8 src/Plugin/SectionStorage/DashboardSectionStorage.php \Drupal\dashboards\Plugin\SectionStorage\DashboardSectionStorage::getLayoutBuilderUrl()
Gets the URL used to display the Layout Builder UI.
Parameters
string $rel: (optional) The link relationship type, for example: 'view' or 'disable'. Defaults to 'view'.
Return value
\Drupal\Core\Url The URL object.
Overrides SectionStorageInterface::getLayoutBuilderUrl
File
- src/
Plugin/ SectionStorage/ DashboardSectionStorage.php, line 205
Class
- DashboardSectionStorage
- Dashboard section storage.
Namespace
Drupal\dashboards\Plugin\SectionStorageCode
public function getLayoutBuilderUrl($rel = 'view') {
return Url::fromRoute("layout_builder.{$this->getStorageType()}.{$rel}", [
'dashboard' => $this
->getDashboard()
->id(),
]);
}