public function IndexInterface::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.
2 methods override IndexInterface::getFieldsByDatasource()
- Index::getFieldsByDatasource in src/
Entity/ Index.php - Returns a list of all indexed fields of a specific datasource.
- UnsavedIndexConfiguration::getFieldsByDatasource in src/
UnsavedIndexConfiguration.php - Returns a list of all indexed fields of a specific datasource.
File
- src/
IndexInterface.php, line 511
Class
- IndexInterface
- Defines the interface for index entities.
Namespace
Drupal\search_apiCode
public function getFieldsByDatasource($datasource_id);