You are here

protected function RouteSubscriber::alterRoutes in Layout Builder Styles 8

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/RouteSubscriber.php, line 16

Class

RouteSubscriber
Class RouteSubscriber.

Namespace

Drupal\layout_builder_styles\EventSubscriber

Code

protected function alterRoutes(RouteCollection $collection) {

  // Needed until https://www.drupal.org/i/3044117 is in.
  $configureSectionRoute = $collection
    ->get('layout_builder.configure_section');
  if ($configureSectionRoute) {
    $configureSectionRoute
      ->setDefault('_form', '\\Drupal\\layout_builder_styles\\Form\\ConfigureSectionForm');
  }
}