You are here

LayoutBuilderIdsRouteSubscriber.php in Layout builder ids 2.0.x

Same filename and directory in other branches
  1. 8 src/EventSubscriber/LayoutBuilderIdsRouteSubscriber.php

File

src/EventSubscriber/LayoutBuilderIdsRouteSubscriber.php
View source
<?php

namespace Drupal\layout_builder_ids\EventSubscriber;

use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;

/**
 * Class RouteSubscriber.
 */
class LayoutBuilderIdsRouteSubscriber extends RouteSubscriberBase {

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

}

Classes

Namesort descending Description
LayoutBuilderIdsRouteSubscriber Class RouteSubscriber.