You are here

class AutocompleteRouteSubscriber in Panopoly 8.2

Rout subscriber to setup our entity autocomplete controller.

Hierarchy

Expanded class hierarchy of AutocompleteRouteSubscriber

1 string reference to 'AutocompleteRouteSubscriber'
panopoly_widgets.services.yml in modules/panopoly/panopoly_widgets/panopoly_widgets.services.yml
modules/panopoly/panopoly_widgets/panopoly_widgets.services.yml
1 service uses AutocompleteRouteSubscriber
panopoly_widgets.route_subscriber in modules/panopoly/panopoly_widgets/panopoly_widgets.services.yml
Drupal\panopoly_widgets\Routing\AutocompleteRouteSubscriber

File

modules/panopoly/panopoly_widgets/src/Routing/AutocompleteRouteSubscriber.php, line 11

Namespace

Drupal\panopoly_widgets\Routing
View source
class AutocompleteRouteSubscriber extends RouteSubscriberBase {

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

}

Members

Namesort descending Modifiers Type Description Overrides
AutocompleteRouteSubscriber::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