protected function DevelRouteSubscriber::alterRoutes in Search API Solr 8
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/ DevelRouteSubscriber.php, line 37
Class
- DevelRouteSubscriber
- Subscriber for Search Api Solr routes.
Namespace
Drupal\search_api_solr\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);
}
}
}