You are here

function nd_views_node_helper in Display Suite 6.3

Helper function for views node plugin.

3 calls to nd_views_node_helper()
ds_views_row_apachesolr in modules/nd/nd.module
Render the apachesolr object through the DS views plugin.
ds_views_row_apachesolr_node in modules/nd/nd.module
Render the apachesolr node object through the DS views plugin.
ds_views_row_node in modules/nd/nd.module
Render the node object through the DS views plugin.

File

modules/nd/nd.module, line 323
Node displays.

Code

function nd_views_node_helper(&$vars, $build_mode) {
  $nid = $vars['row']->nid;
  if (!is_numeric($nid)) {
    return;
  }
  if (module_exists('object_cache')) {
    $node = object_cache_get('node', $nid);
  }
  else {
    $node = node_load($nid);
  }
  if (empty($node)) {
    return;
  }
  $node->build_mode = $build_mode;

  // Check the teaser flag and show_links flag.
  $teaser = $node->build_mode != 'full' ? TRUE : FALSE;
  $show_links = ds_show_field('nd', $node->type, $build_mode, 'links');

  // Build object.
  $vars['object'] = node_view($node, $teaser, FALSE, $show_links);
}