protected function RealnameRouteSubscriber::alterRoutes in Real Name 2.x
Same name and namespace in other branches
- 8 src/Routing/RealnameRouteSubscriber.php \Drupal\realname\Routing\RealnameRouteSubscriber::alterRoutes()
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/ RealnameRouteSubscriber.php, line 16
Class
- RealnameRouteSubscriber
- Subscriber for routes.
Namespace
Drupal\realname\RoutingCode
protected function alterRoutes(RouteCollection $collection) {
if ($route = $collection
->get('system.entity_autocomplete')) {
$route
->setDefault('_controller', '\\Drupal\\realname\\Controller\\RealnameAutocompleteController::handleAutocomplete');
}
}