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


PHP HandlerBase::init方法代码示例

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


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

示例1: init

 /**
  * Overrides Drupal\views\Plugin\views\HandlerBase::init().
  *
  * Make sure that no result area handlers are set to be shown when the result
  * is empty.
  */
 public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL)
 {
     parent::init($view, $display, $options);
     if ($this->areaType == 'empty') {
         $this->options['empty'] = TRUE;
     }
 }
开发者ID:papillon-cendre,项目名称:d8,代码行数:13,代码来源:AreaPluginBase.php

示例2: init

 /**
  * Overrides Drupal\views\Plugin\views\HandlerBase:init().
  */
 public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL)
 {
     parent::init($view, $display, $options);
     if (!empty($this->definition['name field'])) {
         $this->name_field = $this->definition['name field'];
     }
     if (!empty($this->definition['name table'])) {
         $this->name_table = $this->definition['name table'];
     }
 }
开发者ID:shumer,项目名称:blog,代码行数:13,代码来源:ArgumentPluginBase.php

示例3: init

 /**
  * Overrides Drupal\views\Plugin\views\HandlerBase::init().
  */
 public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL)
 {
     parent::init($view, $display, $options);
     $this->additional_fields = array();
     if (!empty($this->definition['additional fields'])) {
         $this->additional_fields = $this->definition['additional fields'];
     }
     if (!isset($this->options['exclude'])) {
         $this->options['exclude'] = '';
     }
 }
开发者ID:anatalsceo,项目名称:en-classe,代码行数:14,代码来源:FieldPluginBase.php

示例4: init

 /**
  * Overrides \Drupal\views\Plugin\views\HandlerBase::init().
  *
  * Init handler to let relationships live on tables other than
  * the table they operate on.
  */
 public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL)
 {
     parent::init($view, $display, $options);
     if (isset($this->definition['relationship table'])) {
         $this->table = $this->definition['relationship table'];
     }
     if (isset($this->definition['relationship field'])) {
         // Set both realField and field so custom handler can rely on the old
         // field value.
         $this->realField = $this->field = $this->definition['relationship field'];
     }
 }
开发者ID:aWEBoLabs,项目名称:taxi,代码行数:18,代码来源:RelationshipPluginBase.php

示例5: init

 /**
  * Overrides \Drupal\views\Plugin\views\HandlerBase::init().
  *
  * Provide some extra help to get the operator/value easier to use.
  *
  * This likely has to be overridden by filters which are more complex
  * than simple operator/value.
  */
 public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL)
 {
     parent::init($view, $display, $options);
     $this->operator = $this->options['operator'];
     $this->value = $this->options['value'];
     $this->group_info = $this->options['group_info']['default_group'];
     // Set the default value of the operator ID.
     if (!empty($options['exposed']) && !empty($options['expose']['operator']) && !isset($options['expose']['operator_id'])) {
         $this->options['expose']['operator_id'] = $options['expose']['operator'];
     }
     if ($this->multipleExposedInput()) {
         $this->group_info = array_filter($options['group_info']['default_group_multiple']);
         $this->options['expose']['multiple'] = TRUE;
     }
     // If there are relationships in the view, allow empty should be true
     // so that we can do IS NULL checks on items. Not all filters respect
     // allow empty, but string and numeric do and that covers enough.
     if ($this->view->display_handler->getOption('relationships')) {
         $this->definition['allow empty'] = TRUE;
     }
 }
开发者ID:alnutile,项目名称:drunatra,代码行数:29,代码来源:FilterPluginBase.php


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