function views_plugin_style_summary_jump_menu::render

cis7 views_plugin_style_summary_jump_menu.inc views_plugin_style_summary_jump_menu::render()
cle7 views_plugin_style_summary_jump_menu.inc views_plugin_style_summary_jump_menu::render()
elmsmedia7 views_plugin_style_summary_jump_menu.inc views_plugin_style_summary_jump_menu::render()
icor7 views_plugin_style_summary_jump_menu.inc views_plugin_style_summary_jump_menu::render()
meedjum_blog7 views_plugin_style_summary_jump_menu.inc views_plugin_style_summary_jump_menu::render()
mooc7 views_plugin_style_summary_jump_menu.inc views_plugin_style_summary_jump_menu::render()

Render the display in this style.

Overrides views_plugin_style::render

File

sites/all/modules/ulmus/views/plugins/views_plugin_style_summary_jump_menu.inc, line 96
Contains the default summary style plugin, which displays items in an HTML list.

Class

views_plugin_style_summary_jump_menu
The default style plugin for summaries.

Code

function render() {
  $argument = $this->view->argument[$this->view->build_info['summary_level']];

  $url_options = array();

  if (!empty($this->view->exposed_raw_input)) {
    $url_options['query'] = $this->view->exposed_raw_input;
  }

  $options = array();
  $default_value = '';
  $row_args = array();
  foreach ($this->view->result as $id => $row) {
    $row_args[$id] = $argument->summary_argument($row);
  }
  $argument->process_summary_arguments($row_args);

  foreach ($this->view->result as $id => $row) {
    $args = $this->view->args;
    $args[$argument->position] = $row_args[$id];
    $base_path = NULL;
    if (!empty($argument->options['summary_options']['base_path'])) {
      $base_path = $argument->options['summary_options']['base_path'];
    }
    $path = url($this->view->get_url($args, $base_path), $url_options);
    $summary_value = strip_tags($argument->summary_name($row));
    $key = md5($path . $summary_value) . "::" . $path;

    $options[$key] = $summary_value;
    if (!empty($this->options['count'])) {
      $options[$key] .= ' (' . intval($row->{$argument->count_alias}) . ')';
    }
    if ($this->options['default_value'] && $_GET['q'] == $this->view->get_url($args)) {
      $default_value = $key;
    }
  }

  ctools_include('jump-menu');
  $settings = array(
    'hide' => $this->options['hide'],
    'button' => $this->options['text'],
    'title' => $this->options['label'],
    'choose' => $this->options['choose'],
    'inline' => $this->options['inline'],
    'default_value' => $default_value,
  );

  $form = drupal_get_form('ctools_jump_menu', $options, $settings);
  return drupal_render($form);
}
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.