Neos.ContentRepository/Classes/Domain/Repository/NodeDataRepository.php
public function findByWorkspace(Workspace $workspace)
    {
        /** @var QueryBuilder $queryBuilder */
        $queryBuilder = $this->entityManager->createQueryBuilder();

        $queryBuilder->select('n')
            ->from(NodeData::class, 'n')
            ->where('n.workspace = :workspace')
            ->andWhere('n.movedTo IS NULL OR n.removed = :removed')
            ->orderBy('n.path', 'ASC')
            ->setParameter('workspace', $workspace->getName())
            ->setParameter('removed', false, \PDO::PARAM_BOOL);

        return $queryBuilder->getQuery()->getResult();
    }
public function findByWorkspace(Workspace $workspace)
    {
        /** @var QueryBuilder $queryBuilder */
        $queryBuilder = $this->entityManager->createQueryBuilder();

        $queryBuilder->select('n')
            ->from(NodeData::class, 'n')
            ->where('n.workspace = :workspace')
            ->andWhere('n.movedTo IS NULL OR n.removed = :removed')
            ->orderBy('n.path', 'ASC')
            ->setParameter('workspace', $workspace->getName())
            ->setParameter('removed', false, \PDO::PARAM_BOOL);

        return $queryBuilder->getQuery()->getResult();
    }
public function findByWorkspace ( Workspace $ workspace ) { /** @var QueryBuilder $queryBuilder */ $ queryBuilder = $ this -> entityManager -> createQueryBuilder ( ) ; $ queryBuilder -> select ( 'n' ) -> from ( NodeData :: class , 'n' ) -> where ( 'n.workspace = :workspace' ) -> andWhere ( 'n.movedTo IS NULL OR n.removed = :removed' ) -> orderBy ( 'n.path' , 'ASC' ) -> setParameter ( 'workspace' , $ workspace -> getName ( ) ) -> setParameter ( 'removed' , false , \ PDO :: PARAM_BOOL ) ; return $ queryBuilder -> getQuery ( ) -> getResult ( ) ; }
Find all NodeData objects inside a given workspace sorted by path to be used
in publishing. The order makes sure that parent nodes are published first.

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

@param Workspace $workspace
@return array<NodeData>
Find all NodeData objects inside a given workspace sorted by path to be used in publishing . The order makes sure that parent nodes are published first .