function views_content_views_row_content_type_render

cis7 views_row.inc views_content_views_row_content_type_render($subtype, $conf, $panel_args, $context)
cle7 views_row.inc views_content_views_row_content_type_render($subtype, $conf, $panel_args, $context)
elmsmedia7 views_row.inc views_content_views_row_content_type_render($subtype, $conf, $panel_args, $context)
icor7 views_row.inc views_content_views_row_content_type_render($subtype, $conf, $panel_args, $context)
meedjum_blog7 views_row.inc views_content_views_row_content_type_render($subtype, $conf, $panel_args, $context)
mooc7 views_row.inc views_content_views_row_content_type_render($subtype, $conf, $panel_args, $context)

Render the node_terms content type.

File

sites/all/modules/ulmus/ctools/views_content/plugins/content_types/views_row.inc, line 32
Allow a view context to display individual rows.

Code

function views_content_views_row_content_type_render($subtype, $conf, $panel_args, $context) {
  if (empty($context) || empty($context->data)) {
    return;
  }

  // Build the content type block.
  $block = new stdClass();
  $block->module = 'views_row';
  $block->delta = $context->argument;
  $block->title = '';
  $block->content = '';

  // This guarantees the view is rendered normally which must happen.
  $view = views_content_context_get_view($context);
  $output = views_content_context_get_output($context);

  $sets = array();
  $plugin = $view->style_plugin;

  // If all rows have to be displayed then simply get the key of all rows.
  $row_indexes = array();
  if (empty($conf['rows'])) {
    if (is_array($output['rows'])) {
      $row_indexes = array_keys($output['rows']);
    }
  }
  else {
    // If a subset of rows is requested collect the list of row keys.
    foreach ($conf['rows'] as $index) {
      $row_indexes[] = $index - 1;
    }
  }

  if (empty($conf['use_fields']) || empty($plugin->row_plugin)) {
    foreach ($row_indexes as $row_index) {
      if (isset($output['rows'][$row_index])) {
        $sets[$plugin->groups[$row_index]][$row_index] = $output['rows'][$row_index];
      }
    }
  }
  else {
    // If we're using specific fields, go through and poke the 'exclude' flag.
    foreach ($view->field as $id => $field) {
      $view->field[$id]->options['exclude'] = empty($conf['fields'][$id]);
    }

    // Rerender just the rows we need.
    foreach ($row_indexes as $row_index) {
      $view->row_index = $row_index;
      if (!empty($view->result[$view->row_index])) {
        $sets[$plugin->groups[$view->row_index]][$view->row_index] = $plugin->row_plugin->render($view->result[$view->row_index]);
      }
      unset($view->row_index);
    }
  }

  foreach ($sets as $title => $rows) {
    $block->content .= theme($plugin->theme_functions(), array(
      'view' => $view,
      'options' => $plugin->options,
      'rows' => $rows,
      'title' => $title,
    ));
  }

  return $block;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.