public function PluginHelper::createDatasourcePlugins in Search API 8
Creates multiple datasource plugin objects for this index.
Parameters
\Drupal\search_api\IndexInterface $index: The index 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 plugins of this type.
array $configurations: (optional) The configurations to set for the plugins, keyed by plugin ID. Missing configurations are either taken from the index's stored settings, if they are present there, or default to an empty array.
Return value
\Drupal\search_api\Datasource\DatasourceInterface[] The created datasource plugin objects.
Throws
\Drupal\search_api\SearchApiException Thrown if an unknown plugin ID is given.
Overrides PluginHelperInterface::createDatasourcePlugins
File
- src/
Utility/ PluginHelper.php, line 150
Class
- PluginHelper
- Provides methods for creating search plugins.
Namespace
Drupal\search_api\UtilityCode
public function createDatasourcePlugins(IndexInterface $index, array $plugin_ids = NULL, array $configuration = []) {
return $this
->createIndexPlugins($index, 'datasource', $plugin_ids, $configuration);
}