Jackalope\ObjectManager::cascadeDelete PHP Method

cascadeDelete() protected method

Notify all cached children that they are deleted as well and clean up internal state
protected cascadeDelete ( string $absPath, boolean $sessionOperation = true )
$absPath string parent node that was removed
$sessionOperation boolean to carry over the session operation information
    protected function cascadeDelete($absPath, $sessionOperation = true)
    {
        foreach ($this->objectsByPath['Node'] as $path => $node) {
            if (strpos($path, "{$absPath}/") === 0) {
                // notify item and let it call removeItem again. save()
                // makes sure no children of already deleted items are
                // deleted again.
                $this->performNodeRemove($path, $node, $sessionOperation, true);
                if (!$node->isDeleted()) {
                    $node->setDeleted();
                }
            }
        }
    }