public function SearchApiDataRow::render in Search API 8
Render a row object. This usually passes through to a theme template of some form, but not always.
Parameters
object $row: A single row of the query result, so an element of $view->result.
Return value
string The rendered output of a single row, used by the style plugin.
Overrides DataEntityRow::render
File
- src/
Plugin/ views/ row/ SearchApiDataRow.php, line 78
Class
- SearchApiDataRow
- Displays entities as raw data.
Namespace
Drupal\search_api\Plugin\views\rowCode
public function render($row) {
/** @var \Drupal\search_api\Plugin\views\ResultRow $row */
if (!$row->_object instanceof ComplexDataInterface) {
$context = [
'%item_id' => $row->search_api_id,
'%view' => $this->view->storage
->label(),
];
$this
->getLogger()
->warning('Failed to load item %item_id in view %view.', $context);
return NULL;
}
return $row->_object;
}