You are here

function google_appliance_help in Google Search Appliance 8

Same name and namespace in other branches
  1. 6.2 google_appliance.module \google_appliance_help()
  2. 7 google_appliance.module \google_appliance_help()

Implements hook_help().

File

./google_appliance.module, line 16
Google Appliance module file.

Code

function google_appliance_help($route_name, RouteMatchInterface $route_match) {
  $output = '';
  switch ($route_name) {
    case 'help.page.google_appliance':
      $output .= '<h2>' . t('About') . '</h2>' . PHP_EOL;
      $output .= '<p>' . t('The Google Appliance module provides an interface to obtain search results from a dedicated Google Search Appliance (GSA) hardware device. Please visit the <a href="@project-page">Google Appliance Project Page</a> to learn more about features and development notes.') . '</p>' . PHP_EOL;
      $output .= '<h2>' . t('Setup and Usage') . '</h2>' . PHP_EOL;
      $output .= '<p>' . t('First, you must set up a collection and frontend on your GSA device that can be accessed publicly. Then configure the connection information on the <a href="@settings-page">Google Appliance Settings page</a> To produce results that include Drupal content, the GSA crawl must have crawled your drupal installation and indexed the desired content. No cron-job configuration is required (ala core Search) since index management is handled by the GSA device.', [
        '@settings-page' => '/admin/config/search/google_appliance/settings',
      ]) . '</p>' . PHP_EOL;
      $output .= '<h3>' . t('Teaming up with core Search') . '</h3>';
      $output .= '<p>' . t('The Google Appliance module can act as a replacement for core <i>Search</i>, or it may operate in tandem with it. Say you want to provide search results for the public to include both drupal and non-drupal content, but you want administrative searches to only provide results for local site content. In this case you use the Google Appliance searches for public search, and core Search for admin searches.') . '</p>' . PHP_EOL;
      $output .= '<p>' . t('If you will use core search along with this module, core search results will show up normally at <code>search/{search terms}</code>, while Google Appliance searches will show up by default at <code>gsearch/{search terms}</code>.') . '</p>' . PHP_EOL;
      $output .= '<h2>' . t('Blocks') . '</h2>';
      $output .= '<p>' . t('The module provides two blocks:') . '</p>' . PHP_EOL;
      $output .= '<ol><li>' . t('the block search form') . '</li>' . PHP_EOL;
      $output .= '<li>' . t('the related searches block') . '</li></ol>' . PHP_EOL;
      $output .= '<p>' . t('Both can be enabled and configured on the <a href="@blocks-admin">Blocks administration page</a>. The block search form provides a search form that can be placed into any block. The related searches block displays a list of links to related results. The related search block only makes sense to appear on results pages, so it should be configured accordingly (i.e. specify <code>gsearch*</code> as the pages for the block to appear on).', [
        '@blocks-admin' => Url::fromRoute('block.admin_display'),
      ]) . '</p>';
      break;
    case 'google_appliance.admin':
      $output = '<p>' . t('The Google Appliance settings specify the interface to your GSA device. The search results obtained via that interface are controlled by the Google Search Appliance configuration itself. Visit the <a href="@gsa-help">Google Appliance help section</a> for more information on setting up the integration.', [
        '@gsa-help' => Url::fromRoute('help.page.google_appliance'),
      ]) . '</p>';
      break;
  }
  return $output;
}