public function DatasourceInterface::getViewModes in Search API 8
Returns the available view modes for this datasource.
Parameters
string|null $bundle: (optional) The bundle for which to return the available view modes. Or NULL to return all view modes for this datasource, across all bundles.
Return value
string[] An associative array of view mode labels, keyed by the view mode ID. Can be empty if it isn't possible to view items of this datasource.
1 method overrides DatasourceInterface::getViewModes()
- DatasourcePluginBase::getViewModes in src/
Datasource/ DatasourcePluginBase.php - Returns the available view modes for this datasource.
File
- src/
Datasource/ DatasourceInterface.php, line 174
Class
- DatasourceInterface
- Describes a source for search items.
Namespace
Drupal\search_api\DatasourceCode
public function getViewModes($bundle = NULL);