Bento box search with multiple targets
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

34 lines
964 B

<?php
/**
* @file
* Implementation of Roblib search for the local Solr (Search API) site index.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_theme().
*/
function roblib_search_solr_site_theme($existing, $type, $theme, $path) {
$modulePath = \Drupal::service('extension.list.module')->getPath('roblib_search');
$spinner_path = '/' . $modulePath . '/img/spinner.gif';
return [
'roblib_search_solr_site_results' => [
'variables' => ['solr_type' => 'results', 'spinner_path' => $spinner_path],
],
'roblib_search_solr_site_bestbet' => [
'variables' => ['solr_type' => 'bestbet', 'spinner_path' => $spinner_path],
],
];
}
/**
* Implements hook_help().
*/
function roblib_search_solr_site_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.roblib_search_solr_site':
return t('<p>Provides a Solr target for the Roblib search module.</p>');
}
}