Neos.ContentRepository/Classes/Command/NodeCommandControllerPlugin.php
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(['path' => $nodePath, 'subpath' => $nodePath . '/%', 'workspace' => $workspaceName])
            ->getQuery()
            ->execute();
    }
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(['path' => $nodePath, 'subpath' => $nodePath . '/%', 'workspace' => $workspaceName])
            ->getQuery()
            ->execute();
    }
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 ( [ 'path' => $ nodePath , 'subpath' => $ nodePath . '/%' , 'workspace' => $ workspaceName ] ) -> getQuery ( ) -> execute ( ) ; }
Removes all nodes with a specific path and their children in the given workspace.

@param string $nodePath
@param string $workspaceName
Removes all nodes with a specific path and their children in the given workspace .