class SimpleLdapUserRouteSubscriber in Simple LDAP 8
Hierarchy
- class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
- class \Drupal\simple_ldap_user\Routing\SimpleLdapUserRouteSubscriber
Expanded class hierarchy of SimpleLdapUserRouteSubscriber
1 string reference to 'SimpleLdapUserRouteSubscriber'
- simple_ldap_user.services.yml in modules/
simple_ldap_user/ simple_ldap_user.services.yml - modules/simple_ldap_user/simple_ldap_user.services.yml
1 service uses SimpleLdapUserRouteSubscriber
File
- modules/
simple_ldap_user/ src/ Routing/ SimpleLdapUserRouteSubscriber.php, line 8
Namespace
Drupal\simple_ldap_user\RoutingView source
class SimpleLdapUserRouteSubscriber extends RouteSubscriberBase {
protected function alterRoutes(RouteCollection $collection) {
if ($route = $collection
->get('user.pass')) {
$route
->setRequirement('_access', 'FALSE');
}
if ($route = $collection
->get('user.register')) {
$route
->setRequirement('_access', 'FALSE');
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RouteSubscriberBase:: |
public static | function | Returns an array of event names this subscriber wants to listen to. | 5 |
RouteSubscriberBase:: |
public | function | Delegates the route altering to self::alterRoutes(). | 1 |
SimpleLdapUserRouteSubscriber:: |
protected | function |
Alters existing routes for a specific collection. Overrides RouteSubscriberBase:: |