public function Page::optionsSummary

Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::optionsSummary().

Overrides PathPluginBase::optionsSummary

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/Page.php, line 101
Contains Drupal\views\Plugin\views\display\Page.

Class

Page
The plugin that handles a full page.

Namespace

Drupal\views\Plugin\views\display

Code

public function optionsSummary(&$categories, &$options) {
  parent::optionsSummary($categories, $options);
  $menu = $this
    ->getOption('menu');
  if (!is_array($menu)) {
    $menu = array(
      'type' => 'none',
    );
  }
  switch ($menu['type']) {
    case 'none':
    default:
      $menu_str = t('No menu');
      break;
    case 'normal':
      $menu_str = t('Normal: @title', array(
        '@title' => $menu['title'],
      ));
      break;
    case 'tab':
    case 'default tab':
      $menu_str = t('Tab: @title', array(
        '@title' => $menu['title'],
      ));
      break;
  }
  $options['menu'] = array(
    'category' => 'page',
    'title' => t('Menu'),
    'value' => views_ui_truncate($menu_str, 24),
  );

  // This adds a 'Settings' link to the style_options setting if the style has options.
  if ($menu['type'] == 'default tab') {
    $options['menu']['setting'] = t('Parent menu item');
    $options['menu']['links']['tab_options'] = t('Change settings for the parent menu');
  }
}