You are here

RouteSubscriber.php in Fast Permissions Administration 3.0.x

Same filename and directory in other branches
  1. 8.2 src/Routing/RouteSubscriber.php

Namespace

Drupal\fpa\Routing

File

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

namespace Drupal\fpa\Routing;

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

/**
 * Listens to the dynamic route events.
 */
class RouteSubscriber extends RouteSubscriberBase {

  /**
   * {@inheritdoc}
   */
  protected function alterRoutes(RouteCollection $collection) {
    $route = $collection
      ->get('user.admin_permissions');
    if ($route) {
      $route
        ->setDefaults([
        '_title' => 'Permissions',
        '_controller' => '\\Drupal\\fpa\\Controller\\FPAController::permissionsList',
      ]);
    }
  }

}

Classes

Namesort descending Description
RouteSubscriber Listens to the dynamic route events.