public function SearchApiFederatedSolrRoutes::routes in Search API Federated Solr 8
Same name and namespace in other branches
- 8.3 src/Routing/SearchApiFederatedSolrRoutes.php \Drupal\search_api_federated_solr\Routing\SearchApiFederatedSolrRoutes::routes()
- 8.2 src/Routing/SearchApiFederatedSolrRoutes.php \Drupal\search_api_federated_solr\Routing\SearchApiFederatedSolrRoutes::routes()
- 4.x src/Routing/SearchApiFederatedSolrRoutes.php \Drupal\search_api_federated_solr\Routing\SearchApiFederatedSolrRoutes::routes()
Returns an array of route objects.
Return value
\Symfony\Component\Routing\Route[] An array of route objects.
1 string reference to 'SearchApiFederatedSolrRoutes::routes'
File
- src/
Routing/ SearchApiFederatedSolrRoutes.php, line 64 - Contains Drupal\search_api_federated_solr\Routing\SearchApiFederatedSolrRoutes.
Class
- SearchApiFederatedSolrRoutes
- Defines a route subscriber to register a url for serving search pages.
Namespace
Drupal\search_api_federated_solr\RoutingCode
public function routes() {
$routes = [];
$app_config = \Drupal::config('search_api_federated_solr.search_app.settings');
$path = $app_config
->get('path') ?: '/search-app';
$args = [
'_controller' => 'Drupal\\search_api_federated_solr\\Controller\\SearchController::searchPage',
'_title' => 'Search',
];
$routes['search_api_federated_solr.search'] = new Route($path, $args, [
'_permission' => 'use federated search',
]);
return $routes;
}