function hook_search_plugin_alter
Same name in other branches
- 9 core/modules/search/search.api.php \hook_search_plugin_alter()
- 8.9.x core/modules/search/search.api.php \hook_search_plugin_alter()
- 11.x 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
Code
function hook_search_plugin_alter(array &$definitions) {
if (isset($definitions['node_search'])) {
$definitions['node_search']['title'] = t('Nodes');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.