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_filter($publishableNodes, function ($item) {
return (bool) $item;
});
}