src/Sulu/Component/DocumentManager/Subscriber/Core/MappingSubscriber.php
private function hydrateReferenceField(
        NodeInterface $node,
        $document,
        DocumentAccessor $accessor,
        $fieldName,
        $locale,
        array $fieldMapping,
        array $options
    ) {
        try {
            $phpcrName = $this->encoder->encode($fieldMapping['encoding'], $fieldMapping['property'], $locale);
            $referencedNode = $node->getPropertyValueWithDefault(
                $phpcrName,
                $this->getDefaultValue($fieldMapping)
            );

            if ($referencedNode) {
                $accessor->set(
                    $fieldName,
                    $this->proxyFactory->createProxyForNode($document, $referencedNode, $options)
                );
            }
        } catch (InvalidLocaleException $ex) {
            // arguments invalid, no valid propertyname could be generated (e.g. no locale given for localized encoding)
            return;
        }
    }
private function hydrateReferenceField(
        NodeInterface $node,
        $document,
        DocumentAccessor $accessor,
        $fieldName,
        $locale,
        array $fieldMapping,
        array $options
    ) {
        try {
            $phpcrName = $this->encoder->encode($fieldMapping['encoding'], $fieldMapping['property'], $locale);
            $referencedNode = $node->getPropertyValueWithDefault(
                $phpcrName,
                $this->getDefaultValue($fieldMapping)
            );

            if ($referencedNode) {
                $accessor->set(
                    $fieldName,
                    $this->proxyFactory->createProxyForNode($document, $referencedNode, $options)
                );
            }
        } catch (InvalidLocaleException $ex) {
            // arguments invalid, no valid propertyname could be generated (e.g. no locale given for localized encoding)
            return;
        }
    }
private function hydrateReferenceField ( NodeInterface $ node , $ document , DocumentAccessor $ accessor , $ fieldName , $ locale , array $ fieldMapping , array $ options ) { try { $ phpcrName = $ this -> encoder -> encode ( $ fieldMapping [ 'encoding' ] , $ fieldMapping [ 'property' ] , $ locale ) ; $ referencedNode = $ node -> getPropertyValueWithDefault ( $ phpcrName , $ this -> getDefaultValue ( $ fieldMapping ) ) ; if ( $ referencedNode ) { $ accessor -> set ( $ fieldName , $ this -> proxyFactory -> createProxyForNode ( $ document , $ referencedNode , $ options ) ) ; } } catch ( InvalidLocaleException $ ex ) { // arguments invalid, no valid propertyname could be generated (e.g. no locale given for localized encoding) return ; } }
Hydrate reference field types.

@param NodeInterface $node
@param mixed $document
@param DocumentAccessor $accessor
@param mixed $fieldName
@param mixed $locale
@param array $fieldMapping
@param array $options
Hydrate reference field types .