You are here

RouteSubscriber.php in Lightning Workflow 8.2

Same filename and directory in other branches
  1. 8.3 src/Routing/RouteSubscriber.php
  2. 8 src/Routing/RouteSubscriber.php

File

src/Routing/RouteSubscriber.php
View source
<?php

namespace Drupal\lightning_workflow\Routing;

use Drupal\Core\Routing\RouteSubscriberBase;
use Drupal\lightning_workflow\Controller\PanelizerIPEController;
use Symfony\Component\Routing\RouteCollection;

/**
 * Reacts to routing events.
 */
class RouteSubscriber extends RouteSubscriberBase {

  /**
   * {@inheritdoc}
   */
  protected function alterRoutes(RouteCollection $collection) {
    $route = $collection
      ->get('panelizer.panels_ipe.revert_to_default');
    if ($route) {
      $route
        ->setDefault('_controller', PanelizerIPEController::class . '::revertToDefault');
    }
  }

}

Classes

Namesort descending Description
RouteSubscriber Reacts to routing events.