コード例 #1
0
 /**
  * If the node for the persisted document is in the registry.
  *
  * @param PersistEvent|ReorderEvent $event
  */
 public function handleNodeFromRegistry($event)
 {
     if ($event->hasNode()) {
         return;
     }
     $document = $event->getDocument();
     if (!$this->documentRegistry->hasDocument($document)) {
         return;
     }
     $node = $this->documentRegistry->getNodeForDocument($document);
     $event->setNode($node);
 }