You are here

function views_attach_plugin_display_node_content::options_summary in Views attach 7.2

Same name and namespace in other branches
  1. 6.2 views_attach_plugin_display_node_content.inc \views_attach_plugin_display_node_content::options_summary()
  2. 6 views_attach_plugin_display_node_content.inc \views_attach_plugin_display_node_content::options_summary()

Provide the summary for page options in the views UI.

This output is returned as an array.

Overrides views_plugin_display::options_summary

File

./views_attach_plugin_display_node_content.inc, line 24

Class

views_attach_plugin_display_node_content
The plugin that handles node-attached views.

Code

function options_summary(&$categories, &$options) {

  // It is very important to call the parent function here:
  parent::options_summary($categories, $options);
  $categories['node_content'] = array(
    'title' => t('Node content settings'),
  );
  $types = $this
    ->get_option('types');
  if (empty($types)) {
    $types = array(
      'story',
    );
  }
  $options['types'] = array(
    'category' => 'node_content',
    'title' => t('Node types'),
    'value' => implode(', ', $types),
  );
  $used_modes = $this
    ->get_option('modes');

  // Get the human readable names.
  $modes = views_attach_build_modes();
  foreach ($used_modes as $mode) {
    $display_modes[] = $modes[$mode];
  }
  $options['modes'] = array(
    'category' => 'node_content',
    'title' => t('Build modes'),
    'value' => implode(', ', $display_modes),
  );
  $weight = $this
    ->get_option('weight');
  if (empty($weight)) {
    $weight = 10;
  }
  $argument_mode = $this
    ->get_option('argument_mode');
  $options['arguments'] = array(
    'category' => 'node_content',
    'title' => t('Arguments'),
    'value' => empty($argument_mode) ? t('None') : check_plain($argument_mode),
  );
  $options['show_title'] = array(
    'category' => 'node_content',
    'title' => t('Show title'),
    'value' => $this
      ->get_option('show_title') ? t('Yes') : t('No'),
  );
}