Neos.ContentRepository/Classes/Command/NodeCommandControllerPlugin.php
protected function getNodeDataByNodeTypeAndWorkspace($nodeType, $workspaceName)
    {
        /** @var QueryBuilder $queryBuilder */
        $queryBuilder = $this->entityManager->createQueryBuilder();

        $queryBuilder->select('n')
            ->distinct()
            ->from(NodeData::class, 'n')
            ->where('n.nodeType = :nodeType')
            ->andWhere('n.workspace = :workspace')
            ->andWhere('n.movedTo IS NULL OR n.removed = :removed')
            ->setParameter('nodeType', $nodeType)
            ->setParameter('workspace', $workspaceName)
            ->setParameter('removed', false, \PDO::PARAM_BOOL);
        return $queryBuilder->getQuery()->getResult();
    }
protected function getNodeDataByNodeTypeAndWorkspace($nodeType, $workspaceName)
    {
        /** @var QueryBuilder $queryBuilder */
        $queryBuilder = $this->entityManager->createQueryBuilder();

        $queryBuilder->select('n')
            ->distinct()
            ->from(NodeData::class, 'n')
            ->where('n.nodeType = :nodeType')
            ->andWhere('n.workspace = :workspace')
            ->andWhere('n.movedTo IS NULL OR n.removed = :removed')
            ->setParameter('nodeType', $nodeType)
            ->setParameter('workspace', $workspaceName)
            ->setParameter('removed', false, \PDO::PARAM_BOOL);
        return $queryBuilder->getQuery()->getResult();
    }
protected function getNodeDataByNodeTypeAndWorkspace ( $ nodeType , $ workspaceName ) { /** @var QueryBuilder $queryBuilder */ $ queryBuilder = $ this -> entityManager -> createQueryBuilder ( ) ; $ queryBuilder -> select ( 'n' ) -> distinct ( ) -> from ( NodeData :: class , 'n' ) -> where ( 'n.nodeType = :nodeType' ) -> andWhere ( 'n.workspace = :workspace' ) -> andWhere ( 'n.movedTo IS NULL OR n.removed = :removed' ) -> setParameter ( 'nodeType' , $ nodeType ) -> setParameter ( 'workspace' , $ workspaceName ) -> setParameter ( 'removed' , false , \ PDO :: PARAM_BOOL ) ; return $ queryBuilder -> getQuery ( ) -> getResult ( ) ; }
Retrieves all NodeData objects of a certain node type inside a given workspace.

Shadow nodes are excluded, because they will be published when publishing the moved node.

@param string $nodeType
@param string $workspaceName
@return array<NodeData>
Retrieves all NodeData objects of a certain node type inside a given workspace .