You are here

function panelizer_plugin_row_panelizer_node_view::render in Panelizer 7.2

Same name and namespace in other branches
  1. 6 plugins/views/panelizer_plugin_row_panelizer_node_view.inc \panelizer_plugin_row_panelizer_node_view::render()
  2. 7.3 plugins/views/panelizer_plugin_row_panelizer_node_view.inc \panelizer_plugin_row_panelizer_node_view::render()
  3. 7 plugins/views/panelizer_plugin_row_panelizer_node_view.inc \panelizer_plugin_row_panelizer_node_view::render()

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_node_view::render

File

plugins/views/panelizer_plugin_row_panelizer_node_view.inc, line 46
Contains the panelizer node view row style plugin.

Class

panelizer_plugin_row_panelizer_node_view
Plugin which renders a panelizer node.

Code

function render($row) {
  $node = node_load($row->nid);
  if (empty($node)) {
    return;
  }
  $handler = panelizer_entity_plugin_get_handler('node');
  $info = $handler
    ->render_entity($node);
  if (empty($info)) {
    if (!empty($this->options['render_anything'])) {
      return parent::render($row);
    }
  }
  else {
    return $info['content'];
  }
}