public function PluginHelper::createSuggesterPlugins in Search API Autocomplete 8
Creates multiple suggester plugin objects for the given search.
Parameters
\Drupal\search_api_autocomplete\SearchInterface $search: The search for which to create the plugins.
string[]|null $plugin_ids: (optional) The IDs of the plugins to create, or NULL to create instances for all known suggesters that support the given search.
array $configurations: (optional) The configurations to set for the plugins, keyed by plugin ID. Missing configurations are either taken from the search's stored settings, if they are present there, or default to an empty array.
Return value
\Drupal\search_api_autocomplete\Suggester\SuggesterInterface[] The created suggester plugin objects, keyed by plugin ID. If a plugin could not be created, it will be missing in the return array.
Overrides PluginHelperInterface::createSuggesterPlugins
File
- src/
Utility/ PluginHelper.php, line 143
Class
- PluginHelper
- Provides methods for creating autocomplete search plugins.
Namespace
Drupal\search_api_autocomplete\UtilityCode
public function createSuggesterPlugins(SearchInterface $search, array $plugin_ids = NULL, array $configurations = []) {
return $this
->createPlugins($search, 'suggester', $plugin_ids, $configurations);
}