protected function RouteSubscriber::alterRoutes in Lightweight Directory Access Protocol (LDAP) 8.3
Same name and namespace in other branches
- 8.4 ldap_authentication/src/Routing/RouteSubscriber.php \Drupal\ldap_authentication\Routing\RouteSubscriber::alterRoutes()
Alters existing routes for a specific collection.
Parameters
\Symfony\Component\Routing\RouteCollection $collection: The route collection for adding routes.
Overrides RouteSubscriberBase::alterRoutes
File
- ldap_authentication/
src/ Routing/ RouteSubscriber.php, line 21
Class
- RouteSubscriber
- Class RouteSubscriber.
Namespace
Drupal\ldap_authentication\RoutingCode
protected function alterRoutes(RouteCollection $collection) {
if ($route = $collection
->get('user.pass')) {
$route
->setRequirement('_custom_access', '\\Drupal\\ldap_authentication\\Routing\\RouteSubscriber::validateResetPasswordAllowed');
}
}