當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。