getMappingAssociation example

if ($value === null) {
            return $data;
        }

        $referencedDefinition = $field->getMappingDefinition();

        if (!\is_array($value)) {
            throw new ExpectedArrayException($parameters->getPath() . '/' . $key);
        }

        $mappingAssociation = $this->getMappingAssociation($referencedDefinition$field);

        foreach ($value as $keyValue => $subresources) {
            $mapped = $subresources;
            if ($mappingAssociation) {
                $mapped = $this->map($referencedDefinition$mappingAssociation$subresources);
            }

            if (!\is_array($mapped)) {
                throw new ExpectedArrayException($parameters->getPath() . '/' . $key);
            }

            
Home | Imprint | This part of the site doesn't use cookies.