You are here

public function RouteSubscriber::alterRoutes in Password Reset Landing Page (PRLP) 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/Routing/RouteSubscriber.php, line 16

Class

RouteSubscriber
Subscriber for prplp routes.

Namespace

Drupal\prlp\Routing

Code

public function alterRoutes(RouteCollection $collection) {

  // Override controller for password reset submit action.
  if ($route = $collection
    ->get('user.reset.login')) {
    $route
      ->setDefault('_controller', '\\Drupal\\prlp\\Controller\\PrlpController::prlpResetPassLogin');
  }
}