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


PHP ConfigManager::getFieldConfig方法代码示例

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


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

示例1: isAttachmentAssociationAccessible

 /**
  * Check if an association between a given entity type and attachments is ready to be used in a business logic.
  * It means that the association should exist and should not be marked as deleted.
  *
  * @param string $entityClass The target entity class
  *
  * @return bool
  */
 protected function isAttachmentAssociationAccessible($entityClass)
 {
     $associationName = ExtendHelper::buildAssociationName($entityClass);
     if (!$this->configManager->hasConfig(self::ATTACHMENT_ENTITY, $associationName)) {
         return false;
     }
     return ExtendHelper::isFieldAccessible($this->configManager->getFieldConfig('extend', self::ATTACHMENT_ENTITY, $associationName));
 }
开发者ID:snorchel,项目名称:platform,代码行数:16,代码来源:AttachmentAssociationHelper.php

示例2: isActivityAssociationAccessible

 /**
  * Check if an association between a given entity type and activity type is ready to be used in a business logic.
  * It means that the association should exist and should not be marked as deleted.
  *
  * @param string $entityClass   The target entity class
  * @param string $activityClass The activity entity class
  *
  * @return bool
  */
 protected function isActivityAssociationAccessible($entityClass, $activityClass)
 {
     $associationName = ExtendHelper::buildAssociationName($entityClass, ActivityScope::ASSOCIATION_KIND);
     if (!$this->configManager->hasConfig($activityClass, $associationName)) {
         return false;
     }
     return ExtendHelper::isFieldAccessible($this->configManager->getFieldConfig('extend', $activityClass, $associationName));
 }
开发者ID:woei66,项目名称:platform,代码行数:17,代码来源:ActivityAssociationHelper.php

示例3: isIgnoredRelation

 /**
  * {@inheritdoc}
  */
 public function isIgnoredRelation(ClassMetadata $metadata, $associationName)
 {
     if (!$this->configManager->hasConfig($metadata->name, $associationName)) {
         return false;
     }
     $extendFieldConfig = $this->configManager->getFieldConfig('extend', $metadata->name, $associationName);
     return !ExtendHelper::isFieldAccessible($extendFieldConfig) || $this->configManager->isHiddenModel($metadata->name, $associationName) || $extendFieldConfig->has('target_entity') && !ExtendHelper::isEntityAccessible($this->configManager->getEntityConfig('extend', $extendFieldConfig->get('target_entity')));
 }
开发者ID:Maksold,项目名称:platform,代码行数:11,代码来源:ExtendExclusionProvider.php

示例4: getConfigById

 /**
  * Gets configuration data for the given entity or field.
  *
  * @param ConfigIdInterface $configId
  *
  * @return ConfigInterface
  */
 public function getConfigById(ConfigIdInterface $configId)
 {
     $className = $configId->getClassName();
     if ($configId instanceof FieldConfigId) {
         return $this->configManager->getFieldConfig($this->scope, $className, $configId->getFieldName());
     } elseif ($className) {
         return $this->configManager->getEntityConfig($this->scope, $className);
     } else {
         return $this->configManager->createEntityConfig($this->scope);
     }
 }
开发者ID:ramunasd,项目名称:platform,代码行数:18,代码来源:ConfigProvider.php

示例5: isIgnoredRelation

 /**
  * {@inheritdoc}
  */
 public function isIgnoredRelation(ClassMetadata $metadata, $associationName)
 {
     if (!$this->configManager->hasConfig($metadata->name, $associationName)) {
         return false;
     }
     $extendFieldConfig = $this->configManager->getFieldConfig('extend', $metadata->name, $associationName);
     if (!ExtendHelper::isFieldAccessible($extendFieldConfig)) {
         return true;
     }
     if ($this->excludeHiddenFields && $this->configManager->isHiddenModel($metadata->name, $associationName)) {
         return true;
     }
     if ($extendFieldConfig->has('target_entity')) {
         $targetEntity = $extendFieldConfig->get('target_entity');
         if (!ExtendHelper::isEntityAccessible($this->configManager->getEntityConfig('extend', $targetEntity))) {
             return true;
         }
         if ($this->excludeHiddenEntities && $this->configManager->isHiddenModel($targetEntity)) {
             return true;
         }
     }
     return false;
 }
开发者ID:startupz,项目名称:platform-1,代码行数:26,代码来源:ExtendExclusionProvider.php

示例6: getFieldConfig

 /**
  * @param FieldConfigId $fieldId
  *
  * @return ConfigInterface
  */
 protected function getFieldConfig(FieldConfigId $fieldId)
 {
     return $this->configManager->getFieldConfig('extend', $fieldId->getClassName(), $fieldId->getFieldName());
 }
开发者ID:woei66,项目名称:platform,代码行数:9,代码来源:RelationMetadataBuilder.php


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