public function UnsavedIndexConfiguration::getFieldsByDatasource in Search API 8
Returns a list of all indexed fields of a specific datasource.
Parameters
string|null $datasource_id: The ID of the datasource whose fields should be retrieved, or NULL to retrieve all datasource-independent fields.
Return value
\Drupal\search_api\Item\FieldInterface[] An array of all indexed fields for the given datasource, keyed by field identifier.
Overrides IndexInterface::getFieldsByDatasource
File
- src/
UnsavedIndexConfiguration.php, line 491
Class
- UnsavedIndexConfiguration
- Represents a configuration of an index that was not yet permanently saved.
Namespace
Drupal\search_apiCode
public function getFieldsByDatasource($datasource_id) {
return $this->entity
->getFieldsByDatasource($datasource_id);
}