src/Sulu/Component/DocumentManager/Subscriber/Behavior/Mapping/ParentSubscriber.php
private function mapParent($document, NodeInterface $node, $options = [])
    {
        // TODO: performance warning: We are eagerly fetching the parent node
        $targetNode = $node->getParent();

        // Do not map non-referenceable parent nodes
        if (!$targetNode->hasProperty('jcr:uuid')) {
            return;
        }

        $document->setParent($this->proxyFactory->createProxyForNode($document, $targetNode, $options));
    }
private function mapParent($document, NodeInterface $node, $options = [])
    {
        // TODO: performance warning: We are eagerly fetching the parent node
        $targetNode = $node->getParent();

        // Do not map non-referenceable parent nodes
        if (!$targetNode->hasProperty('jcr:uuid')) {
            return;
        }

        $document->setParent($this->proxyFactory->createProxyForNode($document, $targetNode, $options));
    }
private function mapParent ( $ document , NodeInterface $ node , $ options = [ ] ) { // TODO: performance warning: We are eagerly fetching the parent node $ targetNode = $ node -> getParent ( ) ; // Do not map non-referenceable parent nodes if ( ! $ targetNode -> hasProperty ( 'jcr:uuid' ) ) { return ; } $ document -> setParent ( $ this -> proxyFactory -> createProxyForNode ( $ document , $ targetNode , $ options ) ) ; }
Map parent document to given document.

@param object $document child-document
@param NodeInterface $node to determine parent
@param array $options options to load parent
Map parent document to given document .