示例#1
0
 /**
  * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::optionsSummary().
  */
 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 = $this->t('No menu');
             break;
         case 'normal':
             $menu_str = $this->t('Normal: @title', array('@title' => $menu['title']));
             break;
         case 'tab':
         case 'default tab':
             $menu_str = $this->t('Tab: @title', array('@title' => $menu['title']));
             break;
     }
     $options['menu'] = array('category' => 'page', 'title' => $this->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'] = $this->t('Parent menu item');
         $options['menu']['links']['tab_options'] = $this->t('Change settings for the parent menu');
     }
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 public function optionsSummary(&$categories, &$options)
 {
     parent::optionsSummary($categories, $options);
     unset($categories['page'], $categories['exposed']);
     // Hide some settings, as they aren't useful for pure data output.
     unset($options['show_admin_links'], $options['analyze-theme']);
     $categories['path'] = array('title' => $this->t('Path settings'), 'column' => 'second', 'build' => array('#weight' => -10));
     $options['path']['category'] = 'path';
     $options['path']['title'] = $this->t('Path');
     // Remove css/exposed form settings, as they are not used for the data
     // display.
     unset($options['exposed_form']);
     unset($options['exposed_block']);
     unset($options['css_class']);
 }
示例#3
0
 /**
  * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::optionsSummary().
  */
 public function optionsSummary(&$categories, &$options)
 {
     parent::optionsSummary($categories, $options);
     // Since we're childing off the 'path' type, we'll still *call* our
     // category 'page' but let's override it so it says feed settings.
     $categories['page'] = array('title' => t('Feed settings'), 'column' => 'second', 'build' => array('#weight' => -10));
     if ($this->getOption('sitename_title')) {
         $options['title']['value'] = t('Using the site name');
     }
     $displays = array_filter($this->getOption('displays'));
     if (count($displays) > 1) {
         $attach_to = t('Multiple displays');
     } elseif (count($displays) == 1) {
         $display = array_shift($displays);
         $displays = $this->view->storage->get('display');
         if (!empty($displays[$display])) {
             $attach_to = String::checkPlain($displays[$display]['display_title']);
         }
     }
     if (!isset($attach_to)) {
         $attach_to = t('None');
     }
     $options['displays'] = array('category' => 'page', 'title' => t('Attach to'), 'value' => $attach_to);
 }
示例#4
0
 /**
  * {@inheritdoc}
  */
 public function optionsSummary(&$categories, &$options)
 {
     parent::optionsSummary($categories, $options);
     // Authentication.
     $auth = $this->getOption('auth') ? implode(', ', $this->getOption('auth')) : $this->t('No authentication is set');
     unset($categories['page'], $categories['exposed']);
     // Hide some settings, as they aren't useful for pure data output.
     unset($options['show_admin_links'], $options['analyze-theme']);
     $categories['path'] = array('title' => $this->t('Path settings'), 'column' => 'second', 'build' => array('#weight' => -10));
     $options['path']['category'] = 'path';
     $options['path']['title'] = $this->t('Path');
     $options['auth'] = array('category' => 'path', 'title' => $this->t('Authentication'), 'value' => views_ui_truncate($auth, 24));
     // Remove css/exposed form settings, as they are not used for the data
     // display.
     unset($options['exposed_form']);
     unset($options['exposed_block']);
     unset($options['css_class']);
 }