Neos\ContentRepository\Command\NodeCommandControllerPlugin::removeNodeAndChildNodesInWorkspaceByPath PHP Метод

removeNodeAndChildNodesInWorkspaceByPath() защищенный Метод

Removes all nodes with a specific path and their children in the given workspace.
protected removeNodeAndChildNodesInWorkspaceByPath ( string $nodePath, string $workspaceName )
$nodePath string
$workspaceName string
    protected function removeNodeAndChildNodesInWorkspaceByPath($nodePath, $workspaceName)
    {
        /** @var QueryBuilder $queryBuilder */
        $queryBuilder = $this->entityManager->createQueryBuilder();
        $queryBuilder->resetDQLParts()->delete(NodeData::class, 'n')->where('n.path LIKE :path')->orWhere('n.path LIKE :subpath')->andWhere('n.workspace = :workspace')->setParameters(array('path' => $nodePath, 'subpath' => $nodePath . '/%', 'workspace' => $workspaceName))->getQuery()->execute();
    }