1 views_plugin_display_attachment.inc views_plugin_display_attachment::options_summary(&$categories, &$options)

Provide the summary for attachment options in the views UI.

This output is returned as an array.

Overrides views_plugin_display::options_summary

File

core/modules/views/plugins/views_plugin_display_attachment.inc, line 54
Contains the attachment display plugin.

Class

views_plugin_display_attachment
The plugin that handles an attachment display.

Code

function options_summary(&$categories, &$options) {
  // It is very important to call the parent function here:
  parent::options_summary($categories, $options);

  $categories['attachment'] = array(
    'title' => t('Attachment settings'),
    'column' => 'second',
    'build' => array(
      '#weight' => -10,
    ),
  );

  $displays = array_filter($this->get_option('displays'));
  if (count($displays) > 1) {
    $attach_to = t('Multiple displays');
  }
  elseif (count($displays) == 1) {
    $display = array_shift($displays);
    if (!empty($this->view->display[$display])) {
      $attach_to = check_plain($this->view->display[$display]->display_title);
    }
  }

  if (!isset($attach_to)) {
    $attach_to = t('Not defined');
  }

  $options['displays'] = array(
    'category' => 'attachment',
    'title' => t('Attach to'),
    'value' => $attach_to,
  );

  $options['attachment_position'] = array(
    'category' => 'attachment',
    'title' => t('Attachment position'),
    'value' => $this->attachment_positions($this->get_option('attachment_position')),
  );

  $options['inherit_arguments'] = array(
    'category' => 'attachment',
    'title' => t('Inherit contextual filters'),
    'value' => $this->get_option('inherit_arguments') ? t('Yes') : t('No'),
  );

  $options['inherit_exposed_filters'] = array(
    'category' => 'attachment',
    'title' => t('Inherit exposed filters'),
    'value' => $this->get_option('inherit_exposed_filters') ? t('Yes') : t('No'),
  );

  $options['inherit_pager'] = array(
    'category' => 'pager',
    'title' => t('Inherit pager'),
    'value' => $this->get_option('inherit_pager') ? t('Yes') : t('No'),
  );

  $options['render_pager'] = array(
    'category' => 'pager',
    'title' => t('Render pager'),
    'value' => $this->get_option('render_pager') ? t('Yes') : t('No'),
  );

}