gss.module in Google Site Search 8
Same filename and directory in other branches
Contains gss.module..
File
gss.moduleView source
<?php
/**
* @file
* Contains gss.module..
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function gss_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the gss module.
case 'help.page.gss':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Provides integration with Google Site Search.') . '</p>';
return $output;
default:
return '';
}
}
/**
* Implements hook_gss_search_result().
*/
function gss_gss_search_result($result) {
if (isset($result->pagemap->cse_thumbnail[0])) {
return [
'cse_thumbnail' => [
'#theme' => 'image',
'#uri' => $result->pagemap->cse_thumbnail[0]->src,
],
];
}
}
Functions
Name | Description |
---|---|
gss_gss_search_result | Implements hook_gss_search_result(). |
gss_help | Implements hook_help(). |