GssSearchController.php in Google Site Search 8
File
src/Controller/GssSearchController.php
View source
<?php
namespace Drupal\gss\Controller;
use Drupal\search\Controller\SearchController;
use Drupal\search\SearchPageInterface;
use Symfony\Component\HttpFoundation\Request;
class GssSearchController extends SearchController {
public function view(Request $request, SearchPageInterface $entity) {
$plugin = $entity
->getPlugin();
$build = parent::view($request, $entity);
$build['pager']['#quantity'] = $plugin
->getPagerSize();
$build['pager']['#tags'][4] = ' ';
return [
'#theme_wrappers' => [
'container__gss_search_page',
],
'#cache' => $build['#cache'],
'#title' => $build['#title'],
'#plugin' => $plugin,
'search_form' => $build['search_form'],
'search_results_title' => @$build['search_results_title'],
'links' => $plugin
->getSearchOptions($request),
'labels' => $plugin
->getLabels($request),
'search_results' => $build['search_results'],
'pager' => $build['pager'],
];
}
}