private function executeRemovals($documents)
    {
        foreach ($documents as $oid => $document) {
            if (empty($this->documentIds[$oid])) {
                continue;
            }

            $class = $this->dm->getClassMetadata(get_class($document));
            $id = $this->getDocumentId($document);

            try {
                $node = $this->session->getNode($id);
                $this->doRemoveAllTranslations($document, $class);
                $node->remove();
            } catch (PathNotFoundException $e) {
            }

            $this->unregisterDocument($document);
            $this->purgeChildren($document);

            if ($invoke = $this->eventListenersInvoker->getSubscribedSystems($class, Event::postRemove)) {
                $this->eventListenersInvoker->invoke(
                    $class,
                    Event::postRemove,
                    $document,
                    new LifecycleEventArgs($document, $this->dm),
                    $invoke
                );
            }
        }
    }
private function executeRemovals($documents)
    {
        foreach ($documents as $oid => $document) {
            if (empty($this->documentIds[$oid])) {
                continue;
            }

            $class = $this->dm->getClassMetadata(get_class($document));
            $id = $this->getDocumentId($document);

            try {
                $node = $this->session->getNode($id);
                $this->doRemoveAllTranslations($document, $class);
                $node->remove();
            } catch (PathNotFoundException $e) {
            }

            $this->unregisterDocument($document);
            $this->purgeChildren($document);

            if ($invoke = $this->eventListenersInvoker->getSubscribedSystems($class, Event::postRemove)) {
                $this->eventListenersInvoker->invoke(
                    $class,
                    Event::postRemove,
                    $document,
                    new LifecycleEventArgs($document, $this->dm),
                    $invoke
                );
            }
        }
    }
private function executeRemovals ( $ documents ) { foreach ( $ documents as $ oid => $ document ) { if ( empty ( $ this -> documentIds [ $ oid ] ) ) { continue ; } $ class = $ this -> dm -> getClassMetadata ( get_class ( $ document ) ) ; $ id = $ this -> getDocumentId ( $ document ) ; try { $ node = $ this -> session -> getNode ( $ id ) ; $ this -> doRemoveAllTranslations ( $ document , $ class ) ; $ node -> remove ( ) ; } catch ( PathNotFoundException $ e ) { } $ this -> unregisterDocument ( $ document ) ; $ this -> purgeChildren ( $ document ) ; if ( $ invoke = $ this -> eventListenersInvoker -> getSubscribedSystems ( $ class , Event :: postRemove ) ) { $ this -> eventListenersInvoker -> invoke ( $ class , Event :: postRemove , $ document , new LifecycleEventArgs ( $ document , $ this -> dm ) , $ invoke ) ; } } }
Executes all document removals.

@param array $documents array of all to be removed documents
Executes all document removals .