public function entity_views_plugin_row_entity_view::render in Entity API 7
Render a row object. This usually passes through to a theme template of some form, but not always.
Parameters
stdClass $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 views_plugin_row::render
File
- views/
plugins/ entity_views_plugin_row_entity_view.inc, line 89 - Row style plugin for displaying the results as entities.
Class
- entity_views_plugin_row_entity_view
- Plugin class for displaying Views results with entity_view.
Code
public function render($values) {
if ($entity = $this
->get_value($values)) {
// Add the view object as views_plugin_row_node_view::render() would.
// Otherwise the views theme suggestions won't work properly.
$entity->view = $this->view;
$render = $this->rendered_content[entity_id($this->entity_type, $entity)];
return drupal_render($render);
}
}