You are here

class RealnameRouteSubscriber in Real Name 8

Same name and namespace in other branches
  1. 2.x src/Routing/RealnameRouteSubscriber.php \Drupal\realname\Routing\RealnameRouteSubscriber

Subscriber for routes.

Hierarchy

Expanded class hierarchy of RealnameRouteSubscriber

1 string reference to 'RealnameRouteSubscriber'
realname.services.yml in ./realname.services.yml
realname.services.yml
1 service uses RealnameRouteSubscriber
realname.route.subscriber in ./realname.services.yml
Drupal\realname\Routing\RealnameRouteSubscriber

File

src/Routing/RealnameRouteSubscriber.php, line 11

Namespace

Drupal\realname\Routing
View source
class RealnameRouteSubscriber extends RouteSubscriberBase {

  /**
   * {@inheritdoc}
   */
  protected function alterRoutes(RouteCollection $collection) {
    if ($route = $collection
      ->get('system.entity_autocomplete')) {
      $route
        ->setDefault('_controller', '\\Drupal\\realname\\Controller\\RealnameAutocompleteController::handleAutocomplete');
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
RealnameRouteSubscriber::alterRoutes protected 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