当前位置: 首页>>代码示例>>PHP>>正文


PHP DisplayPluginBase::optionsSummary方法代码示例

本文整理汇总了PHP中Drupal\views\Plugin\views\display\DisplayPluginBase::optionsSummary方法的典型用法代码示例。如果您正苦于以下问题:PHP DisplayPluginBase::optionsSummary方法的具体用法?PHP DisplayPluginBase::optionsSummary怎么用?PHP DisplayPluginBase::optionsSummary使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Drupal\views\Plugin\views\display\DisplayPluginBase的用法示例。


在下文中一共展示了DisplayPluginBase::optionsSummary方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: optionsSummary

 /**
  * {@inheritdoc}
  */
 public function optionsSummary(&$categories, &$options)
 {
     parent::optionsSummary($categories, $options);
     $categories['display_test'] = array('title' => $this->t('Display test settings'), 'column' => 'second', 'build' => array('#weight' => -100));
     $test_option = $this->getOption('test_option') ?: $this->t('Empty');
     $options['test_option'] = array('category' => 'display_test', 'title' => $this->t('Test option'), 'value' => views_ui_truncate($test_option, 24));
 }
开发者ID:ddrozdik,项目名称:dmaps,代码行数:10,代码来源:DisplayTest.php

示例2: optionsSummary

 /**
  * Provide the summary for attachment options in the views UI.
  *
  * This output is returned as an array.
  */
 public function optionsSummary(&$categories, &$options)
 {
     // It is very important to call the parent function here:
     parent::optionsSummary($categories, $options);
     $categories['attachment'] = array('title' => t('Attachment settings'), 'column' => 'second', 'build' => array('#weight' => -10));
     $displays = array_filter($this->getOption('displays'));
     if (count($displays) > 1) {
         $attach_to = t('Multiple displays');
     } elseif (count($displays) == 1) {
         $display = array_shift($displays);
         if ($display = $this->view->storage->getDisplay($display)) {
             $attach_to = String::checkPlain($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->attachmentPositions($this->getOption('attachment_position')));
     $options['inherit_arguments'] = array('category' => 'attachment', 'title' => t('Inherit contextual filters'), 'value' => $this->getOption('inherit_arguments') ? t('Yes') : t('No'));
     $options['inherit_exposed_filters'] = array('category' => 'attachment', 'title' => t('Inherit exposed filters'), 'value' => $this->getOption('inherit_exposed_filters') ? t('Yes') : t('No'));
     $options['inherit_pager'] = array('category' => 'pager', 'title' => t('Inherit pager'), 'value' => $this->getOption('inherit_pager') ? t('Yes') : t('No'));
     $options['render_pager'] = array('category' => 'pager', 'title' => t('Render pager'), 'value' => $this->getOption('render_pager') ? t('Yes') : t('No'));
 }
开发者ID:anatalsceo,项目名称:en-classe,代码行数:29,代码来源:Attachment.php

示例3: optionsSummary

 /**
  * Provide the summary for page options in the views UI.
  *
  * This output is returned as an array.
  */
 public function optionsSummary(&$categories, &$options)
 {
     parent::optionsSummary($categories, $options);
     $categories['block'] = array('title' => $this->t('Block settings'), 'column' => 'second', 'build' => array('#weight' => -10));
     $block_description = strip_tags($this->getOption('block_description'));
     if (empty($block_description)) {
         $block_description = $this->t('None');
     }
     $block_category = $this->getOption('block_category');
     $options['block_description'] = array('category' => 'block', 'title' => $this->t('Block name'), 'value' => views_ui_truncate($block_description, 24));
     $options['block_category'] = array('category' => 'block', 'title' => $this->t('Block category'), 'value' => views_ui_truncate($block_category, 24));
     $filtered_allow = array_filter($this->getOption('allow'));
     $options['allow'] = array('category' => 'block', 'title' => $this->t('Allow settings'), 'value' => empty($filtered_allow) ? $this->t('None') : $this->t('Items per page'));
     $options['block_hide_empty'] = array('category' => 'other', 'title' => $this->t('Hide block if the view output is empty'), 'value' => $this->getOption('block_hide_empty') ? $this->t('Yes') : $this->t('No'));
 }
开发者ID:ravibarnwal,项目名称:laraitassociate.in,代码行数:20,代码来源:Block.php

示例4: optionsSummary

 /**
  * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::optionsSummary().
  */
 public function optionsSummary(&$categories, &$options)
 {
     parent::optionsSummary($categories, $options);
     $categories['page'] = array('title' => $this->t('Page settings'), 'column' => 'second', 'build' => array('#weight' => -10));
     $path = strip_tags($this->getOption('path'));
     if (empty($path)) {
         $path = $this->t('No path is set');
     } else {
         $path = '/' . $path;
     }
     $options['path'] = array('category' => 'page', 'title' => $this->t('Path'), 'value' => views_ui_truncate($path, 24));
 }
开发者ID:HakS,项目名称:drupal8_training,代码行数:15,代码来源:PathPluginBase.php

示例5: optionsSummary

 /**
  * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::optionsSummary().
  *
  * Disable 'cache' and 'title' so it won't be changed.
  */
 public function optionsSummary(&$categories, &$options)
 {
     parent::optionsSummary($categories, $options);
     unset($options['query']);
     unset($options['title']);
 }
开发者ID:nsp15,项目名称:Drupal8,代码行数:11,代码来源:EntityReference.php


注:本文中的Drupal\views\Plugin\views\display\DisplayPluginBase::optionsSummary方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。