src/Sulu/Component/DocumentManager/Subscriber/Phpcr/RefreshSubscriber.php
public function refreshDocument(RefreshEvent $event)
    {
        $document = $event->getDocument();
        $node = $this->documentRegistry->getNodeForDocument($document);
        $locale = $this->documentRegistry->getLocaleForDocument($document);

        // revert/reload the node to the persisted state
        $node->revert();

        $this->rehydrateDocument($document, $node, $locale);
    }
public function refreshDocument(RefreshEvent $event)
    {
        $document = $event->getDocument();
        $node = $this->documentRegistry->getNodeForDocument($document);
        $locale = $this->documentRegistry->getLocaleForDocument($document);

        // revert/reload the node to the persisted state
        $node->revert();

        $this->rehydrateDocument($document, $node, $locale);
    }
public function refreshDocument ( RefreshEvent $ event ) { $ document = $ event -> getDocument ( ) ; $ node = $ this -> documentRegistry -> getNodeForDocument ( $ document ) ; $ locale = $ this -> documentRegistry -> getLocaleForDocument ( $ document ) ; // revert/reload the node to the persisted state $ node -> revert ( ) ; $ this -> rehydrateDocument ( $ document , $ node , $ locale ) ; }
Refreshes the document when the DocumentManager method for it is called.

@param RefreshEvent $event
Refreshes the document when the DocumentManager method for it is called .