You are here

public function Search::defaultConfiguration in Google Site Search 8

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides ConfigurableSearchPluginBase::defaultConfiguration

1 call to Search::defaultConfiguration()
Search::getResults in src/Plugin/Search/Search.php
Get query result.

File

src/Plugin/Search/Search.php, line 127

Class

Search
Handles search using Google Search Engine.

Namespace

Drupal\gss\Plugin\Search

Code

public function defaultConfiguration() {
  $all_languages = $this
    ->getSupportedLanguages();
  $values = [];
  foreach ($all_languages as $language) {
    $values["search_engine_id_" . $language
      ->getId()] = NULL;
  }
  $values["api_key"] = NULL;
  $values["base_url"] = 'https://www.googleapis.com/customsearch/v1';

  // @todo autocomplete
  // "autocomplete" => TRUE,
  $values["page_size"] = 10;
  $values["pager_size"] = 9;
  $values["images"] = FALSE;
  $values["labels"] = TRUE;

  // @todo number_of_results
  // "number_of_results" => TRUE,
  // @todo info
  // "info" => FALSE,
  return $values;
}