You are here

class RouteSubscriber in Super Login 8

Listens to the dynamic route events.

Hierarchy

Expanded class hierarchy of RouteSubscriber

1 string reference to 'RouteSubscriber'
super_login.services.yml in ./super_login.services.yml
super_login.services.yml
1 service uses RouteSubscriber
super_login.route_subscriber in ./super_login.services.yml
Drupal\super_login\Routing\RouteSubscriber

File

src/Routing/RouteSubscriber.php, line 11

Namespace

Drupal\super_login\Routing
View source
class RouteSubscriber extends RouteSubscriberBase {

  /**
   * {@inheritdoc}
   */
  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',
            ));
      *
      */
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
RouteSubscriber::alterRoutes public function Alters existing routes for a specific collection. Overrides RouteSubscriberBase::alterRoutes
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