public function UserDashboardSectionStorage::buildRoutes in Dashboards with Layout Builder 2.0.x
Same name and namespace in other branches
- 8 src/Plugin/SectionStorage/UserDashboardSectionStorage.php \Drupal\dashboards\Plugin\SectionStorage\UserDashboardSectionStorage::buildRoutes()
Provides the routes needed for Layout Builder UI.
Allows the plugin to add or alter routes during the route building process. \Drupal\layout_builder\Routing\LayoutBuilderRoutesTrait is provided for the typical use case of building a standard Layout Builder UI.
Parameters
\Symfony\Component\Routing\RouteCollection $collection: The route collection.
Overrides DashboardSectionStorage::buildRoutes
See also
\Drupal\Core\Routing\RoutingEvents::ALTER
File
- src/
Plugin/ SectionStorage/ UserDashboardSectionStorage.php, line 43
Class
- UserDashboardSectionStorage
- Class DashboardSectionStorage.
Namespace
Drupal\dashboards\Plugin\SectionStorageCode
public function buildRoutes(RouteCollection $collection) {
$requirements = [];
$this
->buildLayoutRoutes($collection, $this
->getPluginDefinition(), 'dashboard/{dashboard}/override', [
'parameters' => [
'dashboard' => [
'type' => 'entity:dashboard',
],
],
'view_mode' => 'user',
], $requirements, [
'_admin_route' => FALSE,
], '', 'dashboard');
}