class AutocompleteRouteSubscriber in Opigno Learning path 8
Same name and namespace in other branches
- 3.x modules/opigno_alter_entity_autocomplete/src/Routing/AutocompleteRouteSubscriber.php \Drupal\opigno_alter_entity_autocomplete\Routing\AutocompleteRouteSubscriber
Class AutocompleteRouteSubscriber.
Hierarchy
- class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
- class \Drupal\opigno_alter_entity_autocomplete\Routing\AutocompleteRouteSubscriber
Expanded class hierarchy of AutocompleteRouteSubscriber
1 string reference to 'AutocompleteRouteSubscriber'
- opigno_alter_entity_autocomplete.services.yml in modules/
opigno_alter_entity_autocomplete/ opigno_alter_entity_autocomplete.services.yml - modules/opigno_alter_entity_autocomplete/opigno_alter_entity_autocomplete.services.yml
1 service uses AutocompleteRouteSubscriber
- opigno_alter_entity_autocomplete.route_subscriber in modules/
opigno_alter_entity_autocomplete/ opigno_alter_entity_autocomplete.services.yml - Drupal\opigno_alter_entity_autocomplete\Routing\AutocompleteRouteSubscriber
File
- modules/
opigno_alter_entity_autocomplete/ src/ Routing/ AutocompleteRouteSubscriber.php, line 11
Namespace
Drupal\opigno_alter_entity_autocomplete\RoutingView source
class AutocompleteRouteSubscriber extends RouteSubscriberBase {
/**
* Alters route.
*
* @param \Symfony\Component\Routing\RouteCollection $collection
* Routes.
*/
public function alterRoutes(RouteCollection $collection) {
if ($route = $collection
->get('system.entity_autocomplete')) {
$route
->setDefault('_controller', '\\Drupal\\opigno_alter_entity_autocomplete\\Controller\\EntityAutocompleteController::handleAutocomplete');
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AutocompleteRouteSubscriber:: |
public | function |
Alters route. 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 |