You are here

class SimpleLdapUserRouteSubscriber in Simple LDAP 8

Hierarchy

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
simple_ldap_user.route_subscriber in modules/simple_ldap_user/simple_ldap_user.services.yml
Drupal\simple_ldap_user\Routing\SimpleLdapUserRouteSubscriber

File

modules/simple_ldap_user/src/Routing/SimpleLdapUserRouteSubscriber.php, line 8

Namespace

Drupal\simple_ldap_user\Routing
View 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

Namesort descending Modifiers Type Description Overrides
RouteSubscriberBase::getSubscribedEvents public static function Returns an array of event names this subscriber wants to listen to. 5
RouteSubscriberBase::onAlterRoutes public function Delegates the route altering to self::alterRoutes(). 1
SimpleLdapUserRouteSubscriber::alterRoutes protected function Alters existing routes for a specific collection. Overrides RouteSubscriberBase::alterRoutes