You are here

protected function LayoutBuilderIdsRouteSubscriber::alterRoutes in Layout builder ids 2.0.x

Same name and namespace in other branches
  1. 8 src/EventSubscriber/LayoutBuilderIdsRouteSubscriber.php \Drupal\layout_builder_ids\EventSubscriber\LayoutBuilderIdsRouteSubscriber::alterRoutes()

Alters existing routes for a specific collection.

Parameters

\Symfony\Component\Routing\RouteCollection $collection: The route collection for adding routes.

Overrides RouteSubscriberBase::alterRoutes

File

src/EventSubscriber/LayoutBuilderIdsRouteSubscriber.php, line 16

Class

LayoutBuilderIdsRouteSubscriber
Class RouteSubscriber.

Namespace

Drupal\layout_builder_ids\EventSubscriber

Code

protected function alterRoutes(RouteCollection $collection) {
  $configureSectionRoute = $collection
    ->get('layout_builder.configure_section');
  if ($configureSectionRoute) {
    $configureSectionRoute
      ->setDefault('_form', '\\Drupal\\layout_builder_ids\\Form\\ConfigureSectionForm');
  }
}