class CasRouteSubscriber in CAS 8
Same name and namespace in other branches
- 2.x src/Subscriber/CasRouteSubscriber.php \Drupal\cas\Subscriber\CasRouteSubscriber
Alters the user password reset routes.
Hierarchy
- class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
- class \Drupal\cas\Subscriber\CasRouteSubscriber
Expanded class hierarchy of CasRouteSubscriber
1 string reference to 'CasRouteSubscriber'
1 service uses CasRouteSubscriber
File
- src/
Subscriber/ CasRouteSubscriber.php, line 11
Namespace
Drupal\cas\SubscriberView source
class CasRouteSubscriber extends RouteSubscriberBase {
/**
* {@inheritdoc}
*/
protected function alterRoutes(RouteCollection $collection) {
foreach ([
'user.pass',
'user.pass.http',
] as $route_name) {
$collection
->get($route_name)
->setRequirement('_cas_user_access', 'TRUE');
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CasRouteSubscriber:: |
protected | function |
Alters existing routes for a specific collection. Overrides RouteSubscriberBase:: |
|
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 |