本文整理匯總了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));
}
示例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));
}
示例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')));
}
示例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);
}
}
示例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;
}
示例6: getFieldConfig
/**
* @param FieldConfigId $fieldId
*
* @return ConfigInterface
*/
protected function getFieldConfig(FieldConfigId $fieldId)
{
return $this->configManager->getFieldConfig('extend', $fieldId->getClassName(), $fieldId->getFieldName());
}