protected function DevelRouteSubscriber::alterRoutes in Search API Solr 8.2
Same name and namespace in other branches
- 8.3 modules/search_api_solr_devel/src/Routing/DevelRouteSubscriber.php \Drupal\search_api_solr_devel\Routing\DevelRouteSubscriber::alterRoutes()
- 4.x modules/search_api_solr_devel/src/Routing/DevelRouteSubscriber.php \Drupal\search_api_solr_devel\Routing\DevelRouteSubscriber::alterRoutes()
Alters existing routes for a specific collection.
Parameters
\Symfony\Component\Routing\RouteCollection $collection: The route collection for adding routes.
Overrides RouteSubscriberBase::alterRoutes
File
- search_api_solr_devel/
src/ Routing/ DevelRouteSubscriber.php, line 37
Class
- DevelRouteSubscriber
- Subscriber for Search Api Solr routes.
Namespace
Drupal\search_api_solr_devel\RoutingCode
protected function alterRoutes(RouteCollection $collection) {
foreach ($this->entityTypeManager
->getDefinitions() as $entity_type_id => $entity_type) {
if ($route = $this
->getDevelSolrRoute($entity_type)) {
$collection
->add("entity.{$entity_type_id}.devel_solr", $route);
}
}
}