Get the association

@param PropertyMappingConfiguration $mappingConfiguration
@param array $settings settings for allowed properties
@return void
546819
protected function updateMappingConfigurationForAllowedPoperties($mappingConfiguration, $settings)
    {
        $mappingConfiguration->skipUnknownProperties();

        if (isset($settings)) {
            foreach ($settings as $key => $value) {
                if ($value) {
                    $mappingConfiguration->allowProperties($key);
                }
            }
        }
    }
145701
protected function buildArrayFromMappingCollection(MappingCollection $mappingCollection)
    {
        $return = [];

        /** @var $mappingInformation Mapping */
        foreach ($mappingCollection as $mappingInformation) {
            $indexName = $mappingInformation->getType()->getIndex()->getName();
            $typeName = $mappingInformation->getType()->getName();
            if (isset($return[$indexName][$typeName])) {
                throw new ElasticSearchException('There was more than one mapping present in index %s with type %s, which must not happen.', 1339758480);
            }

            $return[$indexName][$typeName]['mappingInstance'] = $mappingInformation;
            $return[$indexName][$typeName]['properties'] = $mappingInformation->getProperties();
        }

        return $return;
    }
395695
protected function convertAssociationsFilter($mappingConfiguration, string $filter = null)
    {
        $this->updateMappingConfigurationForAllowedPoperties($mappingConfiguration, $this->settings['filterAssociations']['allowedProperty']);

        return $this->objectManager->get(PropertyMapper::class)->convert($this->filtertextToArray($filter), AssociationsFilter::class, $mappingConfiguration);
    }
287550
public function setMapOptions(array $settings)
    {
        if (isset($settings['api_key'])) {
            $this->setApiKey($settings['api_key']);
        }

        if ($this->mapOptions) {
            $this->mapOptions = array_replace_recursive($this->mapOptions, $settings);
        } else {
            $this->mapOptions = array_replace_recursive($this->defaultMapOptions(), $settings);
        }

        return $this;
    }
1363700
public function settings(array $settings = null)
    {
        if ($settings) {
            $this->_settings = array_merge($this->_settings, $settings);
        }
        return $this->_settings;
    }
807119
private function formatMappings(array $propertyMappings)
    {
        $output = array();

        foreach ($propertyMappings as $propertyName => $mapping) {
            $output[] = $this->formatField(sprintf('  %s', $propertyName), '');

            foreach ($mapping as $field => $value) {
                $output[] = $this->formatField(sprintf('    %s', $field), $this->formatValue($value));
            }
        }

        return $output;
    }
1176758
final protected function mergeMappings(array $mappingsA, array $mappingsB): array
    {
        foreach ($mappingsB as $key => $value) {
            if (isset($mappingsA[$key]) || \array_key_exists($key, $mappingsA)) {
                if (\is_int($key)) {
                    $mappingsA[] = $value;
                } elseif (\is_array($value) && \is_array($mappingsA[$key])) {
                    $mappingsA[$key] = $this->mergeMappings($mappingsA[$key], $value);
                } else {
                    $mappingsA[$key] = $value;
                }
            } else {
                $mappingsA[$key] = $value;
            }
        }

        return $mappingsA;
    }
1036025
public function initBySetting($model, $setting)
    {
        parent::initBySetting($model, $setting);
        $this->model = $model;
        if (is_array($setting)) {
            if (!isset($setting['remote_class_type'])) {
                throw new \Stack\Exception\MissingSetting('"remote_class_type" missing for the OneToMany relation.');
            }
            if (!isset($setting['related_attribute_name'])) {
                throw new \Stack\Exception\MissingSetting('"related_attribute_name" missing for the OneToMany relation.');
            }
            if (isset($setting['filter_list'])) {
                $this->filterList = $setting['filter_list'];
            }
            if (isset($setting['unique_remote'])) {
                $this->uniqueRemote = !!$setting['unique_remote'];
            }
            $this->remoteModelType = $setting['remote_class_type'];
            $this->relatedAttributeName = $setting['related_attribute_name'];
        }
    }
485006
public static function getGroupSetting ($group, $setting)
	{
		return isset (self::$resourceSettings[$group][$setting])? self::$resourceSettings[$group][$setting] : FALSE;
	}
1132207
public function setAssociationMapping($associationMapping)
    {
        if (!\is_array($associationMapping)) {
            throw new \InvalidArgumentException('The association mapping must be an array');
        }

        $this->associationMapping = $associationMapping;

        if (isset($associationMapping['type'])) {
            $this->type = $this->type ?: $associationMapping['type'];
            $this->mappingType = $this->mappingType ?: $associationMapping['type'];
        } else {
            throw new \InvalidArgumentException('Unknown association mapping type');
        }
        $this->fieldName = $associationMapping['fieldName'];
    }
328720
public function getPropertyMappingConfigurationForPropertyPaths(array $propertyPaths, $className = '')
	{
		$propertyMappingConfiguration = new PropertyMappingConfiguration();
		$propertyMappingConfiguration->allowAllProperties();
		$propertyMappingConfiguration->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED, true);

		foreach ($propertyPaths as $propertyPath) {
			$propertyMappingConfiguration->forProperty($propertyPath)->allowAllProperties();
			$propertyMappingConfiguration->forProperty($propertyPath)->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED, true);
		}
		return $propertyMappingConfiguration;
	}
826449
public function setShardKey(array $keys, array $options = []) : void
    {
        if ($this->inheritanceType === self::INHERITANCE_TYPE_SINGLE_COLLECTION && $this->shardKey !== []) {
            throw MappingException::shardKeyInSingleCollInheritanceSubclass($this->getName());
        }

        if ($this->isEmbeddedDocument) {
            throw MappingException::embeddedDocumentCantHaveShardKey($this->getName());
        }

        foreach (array_keys($keys) as $field) {
            if (! isset($this->fieldMappings[$field])) {
                continue;
            }

            if (in_array($this->fieldMappings[$field]['type'], ['many', 'collection'])) {
                throw MappingException::noMultiKeyShardKeys($this->getName(), $field);
            }

            if ($this->fieldMappings[$field]['strategy'] !== static::STORAGE_STRATEGY_SET) {
                throw MappingException::onlySetStrategyAllowedInShardKey($this->getName(), $field);
            }
        }

        $this->shardKey = [
            'keys' => array_map(static function ($value) {
                if ($value === 1 || $value === -1) {
                    return $value;
                }
                if (is_string($value)) {
                    $lower = strtolower($value);
                    if ($lower === 'asc') {
                        return 1;
                    }

                    if ($lower === 'desc') {
                        return -1;
                    }
                }
                return $value;
            }, $keys),
            'options' => $options,
        ];
    }
859716
public function mapParameter(array $mapping)
    {
        if (isset($this->fieldMappings[$mapping['parameterName']])) {
            throw MappingException::duplicateParameterMapping($this->className, $mapping['parameterName']);
        }
        $this->parameters[$mapping['parameterName']] = $mapping;
    }
108745
protected function registerMappingTypes(array $settings = [], EntityManagerInterface $manager)
    {
        foreach (Arr::get($settings, 'mapping_types', []) as $dbType => $doctrineType) {
            // Throw DBALException if Doctrine Type is not found.
            $manager->getConnection()->getDatabasePlatform()->registerDoctrineTypeMapping($dbType, $doctrineType);
        }
    }
1340776
public function getTroughMapping($mappingId, $id)
    {
        $config            = $this->mapping[ $mappingId ];
        $dataStoreService  = $this->container->get("data.source");
        $externalDataStore = $dataStoreService->get($config["externalDataStore"]);
        $externalDriver    = $externalDataStore->getDriver();
        $internalFieldName = null;
        $externalFieldName = null;

        if (isset($config['internalId'])) {
            $internalFieldName = $config['internalId'];
        }

        if (isset($config['externalId'])) {
            $externalFieldName = $config['externalId'];
        }

        if (isset($config['internalFieldName'])) {
            $internalFieldName = $config['internalFieldName'];
        }

        if (isset($config['relatedFieldName'])) {
            $externalFieldName = $config['relatedFieldName'];
        }

        if (!$externalDriver instanceof DoctrineBaseDriver) {
            throw new Exception('This kind of externalDriver can\'t get relations');
        }

        $criteria = $this->get($id)->getAttribute($internalFieldName);

        return $externalDriver->getByCriteria($criteria, $externalFieldName);
    }
1356728
public function getConfigSetting($setting) {
		$source = $this->getConfigData();
		foreach(func_get_args() as $setting) {
			if(empty($source[$setting])) return null;
			$source = $source[$setting];
		}
		return $source;
	}
1044861
public function setMapping(array $mappingOptions)
    {
        $coverMapping = new CoverFishMapping();
        $coverMapping->setAnnotation($mappingOptions['coverToken']);
        $coverMapping->setMethod($mappingOptions['coverMethod']);
        $coverMapping->setAccessor($mappingOptions['coverAccessor']);
        $coverMapping->setClass($mappingOptions['coverClass']);
        $coverMapping->setClassFQN($mappingOptions['coverClassFQN']);
        $coverMapping->setValidatorMatch($mappingOptions['validatorMatch']);
        $coverMapping->setValidatorClass($mappingOptions['validatorClass']);
        $coverMapping->setValidatorResult($this->validateMapping($coverMapping));

        return $coverMapping;
    }