public function RouteSubscriber::alterRoutes in Super Login 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
- Listens to the dynamic route events.
Namespace
Drupal\super_login\RoutingCode
public function alterRoutes(RouteCollection $collection) {
// Remove the page title of the user login page.
if ($route = $collection
->get('user.login')) {
$config = \Drupal::config('super_login.settings');
/*
$route->setDefaults(array(
'_title' => '',
'_form' => '\Drupal\user\Form\UserLoginForm',
));
*
*/
}
// Remove the page title of the password reset page.
if ($route = $collection
->get('user.pass')) {
$config = \Drupal::config('super_login.settings');
/*
$route->setDefaults(array(
'_title' => '',
'_form' => '\Drupal\user\Form\UserPasswordForm',
));
*
*/
}
}