Neos.ContentRepository/Classes/Domain/Service/PublishingService.php
public function getUnpublishedNodes(Workspace $workspace)
    {
        if ($workspace->getBaseWorkspace() === null) {
            return [];
        }

        $nodeData = $this->nodeDataRepository->findByWorkspace($workspace);
        $unpublishedNodes = [];
        foreach ($nodeData as $singleNodeData) {
            /** @var NodeData $singleNodeData */
            // Skip the root entry from the workspace as it can't be published
            if ($singleNodeData->getPath() === '/') {
                continue;
            }
            $node = $this->nodeFactory->createFromNodeData($singleNodeData, $this->createContext($workspace, $singleNodeData->getDimensionValues()));
            if ($node !== null) {
                $unpublishedNodes[] = $node;
            }
        }

        $unpublishedNodes = $this->sortNodesForPublishing($unpublishedNodes);

        return $unpublishedNodes;
    }
public function getUnpublishedNodes(Workspace $workspace)
    {
        if ($workspace->getBaseWorkspace() === null) {
            return [];
        }

        $nodeData = $this->nodeDataRepository->findByWorkspace($workspace);
        $unpublishedNodes = [];
        foreach ($nodeData as $singleNodeData) {
            /** @var NodeData $singleNodeData */
            // Skip the root entry from the workspace as it can't be published
            if ($singleNodeData->getPath() === '/') {
                continue;
            }
            $node = $this->nodeFactory->createFromNodeData($singleNodeData, $this->createContext($workspace, $singleNodeData->getDimensionValues()));
            if ($node !== null) {
                $unpublishedNodes[] = $node;
            }
        }

        $unpublishedNodes = $this->sortNodesForPublishing($unpublishedNodes);

        return $unpublishedNodes;
    }
public function getUnpublishedNodes ( Workspace $ workspace ) { if ( $ workspace -> getBaseWorkspace ( ) === null ) { return [ ] ; } $ nodeData = $ this -> nodeDataRepository -> findByWorkspace ( $ workspace ) ; $ unpublishedNodes = [ ] ; foreach ( $ nodeData as $ singleNodeData ) { /** @var NodeData $singleNodeData */ // Skip the root entry from the workspace as it can't be published if ( $ singleNodeData -> getPath ( ) === '/' ) { continue ; } $ node = $ this -> nodeFactory -> createFromNodeData ( $ singleNodeData , $ this -> createContext ( $ workspace , $ singleNodeData -> getDimensionValues ( ) ) ) ; if ( $ node !== null ) { $ unpublishedNodes [ ] = $ node ; } } $ unpublishedNodes = $ this -> sortNodesForPublishing ( $ unpublishedNodes ) ; return $ unpublishedNodes ; }
Returns a list of nodes contained in the given workspace which are not yet published

@param Workspace $workspace
@return array<\Neos\ContentRepository\Domain\Model\NodeInterface>
@api
Returns a list of nodes contained in the given workspace which are not yet published