Doctrine\ODM\PHPCR\UnitOfWork::executeRemovals PHP Method

executeRemovals() private method

Executes all document removals
private executeRemovals ( array $documents )
$documents array array of all to be removed documents
    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);
            }
        }
    }
UnitOfWork