public function getPublishableNodeInfo(Workspace $workspace)
    {
        $publishableNodes = $this->publishingService->getUnpublishedNodes($workspace);

        $publishableNodes = array_map(function ($node) {
            if ($documentNode = $this->nodeService->getClosestDocument($node)) {
                return [
                    'contextPath' => $node->getContextPath(),
                    'documentContextPath' => $documentNode->getContextPath()
                ];
            }
        }, $publishableNodes);

        return array_values(array_filter($publishableNodes, function ($item) {
            return (bool)$item;
        }));
    }
public function getPublishableNodeInfo(Workspace $workspace)
    {
        $publishableNodes = $this->publishingService->getUnpublishedNodes($workspace);

        $publishableNodes = array_map(function ($node) {
            if ($documentNode = $this->nodeService->getClosestDocument($node)) {
                return [
                    'contextPath' => $node->getContextPath(),
                    'documentContextPath' => $documentNode->getContextPath()
                ];
            }
        }, $publishableNodes);

        return array_values(array_filter($publishableNodes, function ($item) {
            return (bool)$item;
        }));
    }
public function getPublishableNodeInfo ( Workspace $ workspace ) { $ publishableNodes = $ this -> publishingService -> getUnpublishedNodes ( $ workspace ) ; $ publishableNodes = array_map ( function ( $ node ) { if ( $ documentNode = $ this -> nodeService -> getClosestDocument ( $ node ) ) { return [ 'contextPath' => $ node -> getContextPath ( ) , 'documentContextPath' => $ documentNode -> getContextPath ( ) ] ; } } , $ publishableNodes ) ; return array_values ( array_filter ( $ publishableNodes , function ( $ item ) { return ( bool ) $ item ; } ) ) ; }
Get all publishable node context paths for a workspace

@param Workspace $workspace
@return array
Get all publishable node context paths for a workspace