You are here

function hook_search_api_displays_alter in Search API 8

Alter the list of known search displays.

Parameters

array $displays: The Search API display info array, keyed by display ID.

Deprecated

in search_api:8.x-1.14 and is removed from search_api:2.0.0. Please use the "search_api.gathering_displays" event instead.

See also

https://www.drupal.org/node/3059866

\Drupal\search_api\Display\DisplayPluginBase

1 function implements hook_search_api_displays_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

search_api_test_hooks_search_api_displays_alter in tests/search_api_test_hooks/search_api_test_hooks.search_api.inc
Implements hook_search_api_displays_alter().
1 invocation of hook_search_api_displays_alter()
DisplayPluginManager::__construct in src/Display/DisplayPluginManager.php
Constructs a new class instance.

File

./search_api.api.php, line 169
Hooks provided by the Search API module.

Code

function hook_search_api_displays_alter(array &$displays) {
  if (isset($displays['some_key'])) {
    $displays['some_key']['label'] = t('New label for existing Display');
  }
}