class RealnameRouteSubscriber in Real Name 8
Same name and namespace in other branches
- 2.x src/Routing/RealnameRouteSubscriber.php \Drupal\realname\Routing\RealnameRouteSubscriber
Subscriber for routes.
Hierarchy
- class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
- class \Drupal\realname\Routing\RealnameRouteSubscriber
Expanded class hierarchy of RealnameRouteSubscriber
1 string reference to 'RealnameRouteSubscriber'
1 service uses RealnameRouteSubscriber
File
- src/
Routing/ RealnameRouteSubscriber.php, line 11
Namespace
Drupal\realname\RoutingView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RealnameRouteSubscriber:: |
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 |