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


PHP EntityManagerInterface::hasHandler方法代码示例

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


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

示例1: getDerivativeDefinitions

 /**
  * {@inheritdoc}
  */
 public function getDerivativeDefinitions($base_plugin_definition)
 {
     foreach ($this->entityManager->getDefinitions() as $entity_type_id => $entity_type) {
         // Just add support for entity types which have a views integration.
         if (($base_table = $entity_type->getBaseTable()) && $this->viewsData->get($base_table) && $this->entityManager->hasHandler($entity_type_id, 'view_builder')) {
             $this->derivatives[$entity_type_id] = array('id' => 'entity:' . $entity_type_id, 'provider' => 'views', 'title' => $entity_type->getLabel(), 'help' => t('Display the @label', array('@label' => $entity_type->getLabel())), 'base' => array($entity_type->getDataTable() ?: $entity_type->getBaseTable()), 'entity_type' => $entity_type_id, 'display_types' => array('normal'), 'class' => $base_plugin_definition['class']);
         }
     }
     return $this->derivatives;
 }
开发者ID:eigentor,项目名称:tommiblog,代码行数:13,代码来源:ViewsEntityRow.php

示例2: calculateDependencies

 /**
  * {@inheritdoc}
  */
 public function calculateDependencies()
 {
     $dependencies = parent::calculateDependencies();
     $entity_type_id = $this->definition['entity_type'];
     $bundle_entity_type = $this->entityManager->getDefinition($entity_type_id)->getBundleEntityType();
     // The bundle entity type might not exist. For example, users do not have
     // bundles.
     if ($this->entityManager->hasHandler($bundle_entity_type, 'storage')) {
         $bundle_entity_storage = $this->entityManager->getStorage($bundle_entity_type);
         foreach ($bundle_entity_storage->loadMultiple(array_keys($this->options['bundles'])) as $bundle_entity) {
             $dependencies[$bundle_entity->getConfigDependencyKey()][] = $bundle_entity->getConfigDependencyName();
         }
     }
     return $dependencies;
 }
开发者ID:eigentor,项目名称:tommiblog,代码行数:18,代码来源:Entity.php

示例3: applies

 /**
  * {@inheritdoc}
  */
 public function applies(RouteMatchInterface $route_match)
 {
     return $this->entityManager->hasHandler('user_role', 'storage') && $this->user->hasPermission('view the administration theme') && $this->adminContext->isAdminRoute($route_match->getRouteObject());
 }
开发者ID:aWEBoLabs,项目名称:taxi,代码行数:7,代码来源:AdminNegotiator.php

示例4: hasHandler

 /**
  * {@inheritdoc}
  */
 public function hasHandler($entity_type, $handler_type)
 {
     return $this->entityManager->hasHandler($entity_type, $handler_type);
 }
开发者ID:ddrozdik,项目名称:dmaps,代码行数:7,代码来源:EntityManagerWrapper.php


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