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


PHP HandlerBase::defineOptions方法代码示例

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


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

示例1: defineOptions

 protected function defineOptions()
 {
     $options = parent::defineOptions();
     $options['order'] = array('default' => 'ASC');
     $options['exposed'] = array('default' => FALSE);
     $options['expose'] = array('contains' => array('label' => array('default' => '')));
     return $options;
 }
开发者ID:nstielau,项目名称:drops-8,代码行数:8,代码来源:SortPluginBase.php

示例2: defineOptions

 /**
  * {@inheritdoc}
  */
 protected function defineOptions()
 {
     $options = parent::defineOptions();
     $this->definition['field'] = !empty($this->definition['field']) ? $this->definition['field'] : '';
     $label = !empty($this->definition['label']) ? $this->definition['label'] : $this->definition['field'];
     $options['admin_label']['default'] = $label;
     $options['empty'] = array('default' => FALSE);
     return $options;
 }
开发者ID:papillon-cendre,项目名称:d8,代码行数:12,代码来源:AreaPluginBase.php

示例3: defineOptions

 /**
  * {@inheritdoc}
  */
 protected function defineOptions()
 {
     $options = parent::defineOptions();
     // Relationships definitions should define a default label, but if they aren't get another default value.
     if (!empty($this->definition['label'])) {
         // Cast the label to a string since it is an object.
         // @see \Drupal\Core\StringTranslation\TranslationWrapper
         $label = (string) $this->definition['label'];
     } else {
         $label = !empty($this->definition['field']) ? $this->definition['field'] : $this->definition['base field'];
     }
     $options['admin_label']['default'] = $label;
     $options['required'] = array('default' => FALSE);
     return $options;
 }
开发者ID:davidsoloman,项目名称:drupalconsole.com,代码行数:18,代码来源:RelationshipPluginBase.php

示例4: defineOptions

 protected function defineOptions()
 {
     $options = parent::defineOptions();
     $options['label'] = array('default' => $this->definition['title'], 'translatable' => TRUE);
     $options['exclude'] = array('default' => FALSE, 'bool' => TRUE);
     $options['alter'] = array('contains' => array('alter_text' => array('default' => FALSE, 'bool' => TRUE), 'text' => array('default' => '', 'translatable' => TRUE), 'make_link' => array('default' => FALSE, 'bool' => TRUE), 'path' => array('default' => ''), 'absolute' => array('default' => FALSE, 'bool' => TRUE), 'external' => array('default' => FALSE, 'bool' => TRUE), 'replace_spaces' => array('default' => FALSE, 'bool' => TRUE), 'path_case' => array('default' => 'none', 'translatable' => FALSE), 'trim_whitespace' => array('default' => FALSE, 'bool' => TRUE), 'alt' => array('default' => '', 'translatable' => TRUE), 'rel' => array('default' => ''), 'link_class' => array('default' => ''), 'prefix' => array('default' => '', 'translatable' => TRUE), 'suffix' => array('default' => '', 'translatable' => TRUE), 'target' => array('default' => ''), 'nl2br' => array('default' => FALSE, 'bool' => TRUE), 'max_length' => array('default' => ''), 'word_boundary' => array('default' => TRUE, 'bool' => TRUE), 'ellipsis' => array('default' => TRUE, 'bool' => TRUE), 'more_link' => array('default' => FALSE, 'bool' => TRUE), 'more_link_text' => array('default' => '', 'translatable' => TRUE), 'more_link_path' => array('default' => ''), 'strip_tags' => array('default' => FALSE, 'bool' => TRUE), 'trim' => array('default' => FALSE, 'bool' => TRUE), 'preserve_tags' => array('default' => ''), 'html' => array('default' => FALSE, 'bool' => TRUE)));
     $options['element_type'] = array('default' => '');
     $options['element_class'] = array('default' => '');
     $options['element_label_type'] = array('default' => '');
     $options['element_label_class'] = array('default' => '');
     $options['element_label_colon'] = array('default' => TRUE, 'bool' => TRUE);
     $options['element_wrapper_type'] = array('default' => '');
     $options['element_wrapper_class'] = array('default' => '');
     $options['element_default_classes'] = array('default' => TRUE, 'bool' => TRUE);
     $options['empty'] = array('default' => '', 'translatable' => TRUE);
     $options['hide_empty'] = array('default' => FALSE, 'bool' => TRUE);
     $options['empty_zero'] = array('default' => FALSE, 'bool' => TRUE);
     $options['hide_alter_empty'] = array('default' => TRUE, 'bool' => TRUE);
     return $options;
 }
开发者ID:anatalsceo,项目名称:en-classe,代码行数:20,代码来源:FieldPluginBase.php

示例5: defineOptions

 protected function defineOptions()
 {
     $options = parent::defineOptions();
     $options['operator'] = array('default' => '=');
     $options['value'] = array('default' => '');
     $options['group'] = array('default' => '1');
     $options['exposed'] = array('default' => FALSE);
     $options['expose'] = array('contains' => array('operator_id' => array('default' => FALSE), 'label' => array('default' => ''), 'description' => array('default' => ''), 'use_operator' => array('default' => FALSE), 'operator' => array('default' => ''), 'identifier' => array('default' => ''), 'required' => array('default' => FALSE), 'remember' => array('default' => FALSE), 'multiple' => array('default' => FALSE), 'remember_roles' => array('default' => array(RoleInterface::AUTHENTICATED_ID => RoleInterface::AUTHENTICATED_ID))));
     // A group is a combination of a filter, an operator and a value
     // operating like a single filter.
     // Users can choose from a select box which group they want to apply.
     // Views will filter the view according to the defined values.
     // Because it acts as a standard filter, we have to define
     // an identifier and other settings like the widget and the label.
     // This settings are saved in another array to allow users to switch
     // between a normal filter and a group of filters with a single click.
     $options['is_grouped'] = array('default' => FALSE);
     $options['group_info'] = array('contains' => array('label' => array('default' => ''), 'description' => array('default' => ''), 'identifier' => array('default' => ''), 'optional' => array('default' => TRUE), 'widget' => array('default' => 'select'), 'multiple' => array('default' => FALSE), 'remember' => array('default' => 0), 'default_group' => array('default' => 'All'), 'default_group_multiple' => array('default' => array()), 'group_items' => array('default' => array())));
     return $options;
 }
开发者ID:ravindrasingh22,项目名称:Drupal-8-rc,代码行数:20,代码来源:FilterPluginBase.php

示例6: defineOptions

 protected function defineOptions()
 {
     $options = parent::defineOptions();
     $options['label'] = array('default' => '');
     // Some styles (for example table) should have labels enabled by default.
     $style = $this->view->getStyle();
     if (isset($style) && $style->defaultFieldLabels()) {
         $options['label']['default'] = $this->definition['title'];
     }
     $options['exclude'] = array('default' => FALSE);
     $options['alter'] = array('contains' => array('alter_text' => array('default' => FALSE), 'text' => array('default' => ''), 'make_link' => array('default' => FALSE), 'path' => array('default' => ''), 'absolute' => array('default' => FALSE), 'external' => array('default' => FALSE), 'replace_spaces' => array('default' => FALSE), 'path_case' => array('default' => 'none'), 'trim_whitespace' => array('default' => FALSE), 'alt' => array('default' => ''), 'rel' => array('default' => ''), 'link_class' => array('default' => ''), 'prefix' => array('default' => ''), 'suffix' => array('default' => ''), 'target' => array('default' => ''), 'nl2br' => array('default' => FALSE), 'max_length' => array('default' => 0), 'word_boundary' => array('default' => TRUE), 'ellipsis' => array('default' => TRUE), 'more_link' => array('default' => FALSE), 'more_link_text' => array('default' => ''), 'more_link_path' => array('default' => ''), 'strip_tags' => array('default' => FALSE), 'trim' => array('default' => FALSE), 'preserve_tags' => array('default' => ''), 'html' => array('default' => FALSE)));
     $options['element_type'] = array('default' => '');
     $options['element_class'] = array('default' => '');
     $options['element_label_type'] = array('default' => '');
     $options['element_label_class'] = array('default' => '');
     $options['element_label_colon'] = array('default' => TRUE);
     $options['element_wrapper_type'] = array('default' => '');
     $options['element_wrapper_class'] = array('default' => '');
     $options['element_default_classes'] = array('default' => TRUE);
     $options['empty'] = array('default' => '');
     $options['hide_empty'] = array('default' => FALSE);
     $options['empty_zero'] = array('default' => FALSE);
     $options['hide_alter_empty'] = array('default' => TRUE);
     return $options;
 }
开发者ID:nstielau,项目名称:drops-8,代码行数:25,代码来源:FieldPluginBase.php

示例7: defineOptions

 protected function defineOptions()
 {
     $options = parent::defineOptions();
     $options['default_action'] = array('default' => 'ignore');
     $options['exception'] = array('contains' => array('value' => array('default' => 'all'), 'title_enable' => array('default' => FALSE, 'bool' => TRUE), 'title' => array('default' => 'All', 'translatable' => TRUE)));
     $options['title_enable'] = array('default' => FALSE, 'bool' => TRUE);
     $options['title'] = array('default' => '', 'translatable' => TRUE);
     $options['default_argument_type'] = array('default' => 'fixed');
     $options['default_argument_options'] = array('default' => array());
     $options['default_argument_skip_url'] = array('default' => FALSE, 'bool' => TRUE);
     $options['summary_options'] = array('default' => array());
     $options['summary'] = array('contains' => array('sort_order' => array('default' => 'asc'), 'number_of_records' => array('default' => 0), 'format' => array('default' => 'default_summary')));
     $options['specify_validation'] = array('default' => FALSE, 'bool' => TRUE);
     $options['validate'] = array('contains' => array('type' => array('default' => 'none'), 'fail' => array('default' => 'not found')));
     $options['validate_options'] = array('default' => array());
     return $options;
 }
开发者ID:shumer,项目名称:blog,代码行数:17,代码来源:ArgumentPluginBase.php


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