public function TestDatasource::loadMultiple in Search API 8
Loads multiple items.
Parameters
array $ids: An array of datasource-specific item IDs.
Return value
\Drupal\Core\TypedData\ComplexDataInterface[] An associative array of loaded items, keyed by their (datasource-specific) IDs.
Overrides DatasourcePluginBase::loadMultiple
File
- tests/
search_api_test/ src/ Plugin/ search_api/ datasource/ TestDatasource.php, line 33
Class
- TestDatasource
- Provides a datasource for testing purposes.
Namespace
Drupal\search_api_test\Plugin\search_api\datasourceCode
public function loadMultiple(array $ids) {
$data = $this
->getReturnValue(__FUNCTION__, []);
return array_intersect_key($data, array_flip($ids));
}