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


PHP DisplayPluginBase::validate方法代码示例

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


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

示例1: validate

 /**
  * {@inheritdoc}
  */
 public function validate()
 {
     $errors = parent::validate();
     $errors += $this->validatePath($this->getOption('path'));
     return $errors;
 }
开发者ID:HakS,项目名称:drupal8_training,代码行数:9,代码来源:PathPluginBase.php

示例2: validate

 /**
  * {@inheritdoc}
  */
 public function validate()
 {
     $errors = parent::validate();
     foreach ($this->view->displayHandlers as $display_handler) {
         $errors[] = 'error';
     }
     return $errors;
 }
开发者ID:ddrozdik,项目名称:dmaps,代码行数:11,代码来源:DisplayTest.php

示例3: validate

 /**
  * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::validate().
  */
 public function validate()
 {
     $errors = parent::validate();
     // Verify that search fields are set up.
     $style = $this->getOption('style');
     if (!isset($style['options']['search_fields'])) {
         $errors[] = $this->t('Display "@display" needs a selected search fields to work properly. See the settings for the Entity Reference list format.', array('@display' => $this->display['display_title']));
     } else {
         // Verify that the search fields used actually exist.
         $fields = array_keys($this->handlers['field']);
         foreach ($style['options']['search_fields'] as $field_alias => $enabled) {
             if ($enabled && !in_array($field_alias, $fields)) {
                 $errors[] = $this->t('Display "@display" uses field %field as search field, but the field is no longer present. See the settings for the Entity Reference list format.', array('@display' => $this->display['display_title'], '%field' => $field_alias));
             }
         }
     }
     return $errors;
 }
开发者ID:nsp15,项目名称:Drupal8,代码行数:21,代码来源:EntityReference.php


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