You are here

function hook_search_plugin_alter in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/search/search.api.php \hook_search_plugin_alter()

Alter search plugin definitions.

Parameters

array $definitions: The array of search plugin definitions, keyed by plugin ID.

See also

\Drupal\search\Annotation\SearchPlugin

\Drupal\search\SearchPluginManager

Related topics

1 invocation of hook_search_plugin_alter()
SearchPluginManager::__construct in core/modules/search/src/SearchPluginManager.php
Constructs SearchPluginManager

File

core/modules/search/search.api.php, line 76
Hooks provided by the Search module.

Code

function hook_search_plugin_alter(array &$definitions) {
  if (isset($definitions['node_search'])) {
    $definitions['node_search']['title'] = t('Nodes');
  }
}