Document/Subscriber/ArticlePageSubscriber.php
public function setParentOnHydrate(HydrateEvent $event)
    {
        $document = $event->getDocument();
        if (!$document instanceof ArticlePageDocument || $document->getParent()) {
            return;
        }

        $parent = $this->documentManager->find(
            $event->getNode()->getParent()->getIdentifier(),
            $document->getOriginalLocale(),
            $event->getOptions()
        );
        $document->setParent($parent);
    }
public function setParentOnHydrate(HydrateEvent $event)
    {
        $document = $event->getDocument();
        if (!$document instanceof ArticlePageDocument || $document->getParent()) {
            return;
        }

        $parent = $this->documentManager->find(
            $event->getNode()->getParent()->getIdentifier(),
            $document->getOriginalLocale(),
            $event->getOptions()
        );
        $document->setParent($parent);
    }
public function setParentOnHydrate ( HydrateEvent $ event ) { $ document = $ event -> getDocument ( ) ; if ( ! $ document instanceof ArticlePageDocument || $ document -> getParent ( ) ) { return ; } $ parent = $ this -> documentManager -> find ( $ event -> getNode ( ) -> getParent ( ) -> getIdentifier ( ) , $ document -> getOriginalLocale ( ) , $ event -> getOptions ( ) ) ; $ document -> setParent ( $ parent ) ; }
Hydrate parent to avoid proxiing it.

@param HydrateEvent $event
Hydrate parent to avoid proxiing it .