public function DatasourceInterface::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.
1 method overrides DatasourceInterface::viewItem()
- DatasourcePluginBase::viewItem in src/
Datasource/ DatasourcePluginBase.php - Returns the render array for the provided item and view mode.
File
- src/
Datasource/ DatasourceInterface.php, line 201
Class
- DatasourceInterface
- Describes a source for search items.
Namespace
Drupal\search_api\DatasourceCode
public function viewItem(ComplexDataInterface $item, $view_mode, $langcode = NULL);