public function DatasourcePluginBase::viewItem in Search API 8
Returns the render array for the provided item and view mode.
Parameters
\Drupal\Core\TypedData\ComplexDataInterface $item: The item to render.
string $view_mode: (optional) The view mode that should be used to render the item.
string|null $langcode: (optional) For which language the item should be rendered. Defaults to the language the item has been loaded in.
Return value
array A render array for displaying the item.
Overrides DatasourceInterface::viewItem
1 call to DatasourcePluginBase::viewItem()
- DatasourcePluginBase::viewMultipleItems in src/
Datasource/ DatasourcePluginBase.php - Returns the render array for the provided items and view mode.
1 method overrides DatasourcePluginBase::viewItem()
- ContentEntity::viewItem in src/
Plugin/ search_api/ datasource/ ContentEntity.php - Returns the render array for the provided item and view mode.
File
- src/
Datasource/ DatasourcePluginBase.php, line 132
Class
- DatasourcePluginBase
- Defines a base class from which other datasources may extend.
Namespace
Drupal\search_api\DatasourceCode
public function viewItem(ComplexDataInterface $item, $view_mode, $langcode = NULL) {
return [];
}