Neos\Neos\Service\Controller\WorkspaceController::publishNodesAction PHP Method

publishNodesAction() public method

Publishes the given nodes to the specified targetWorkspace
public publishNodesAction ( array $nodes, string $targetWorkspaceName = null ) : void
$nodes array
$targetWorkspaceName string
return void
    public function publishNodesAction(array $nodes, $targetWorkspaceName = null)
    {
        $targetWorkspace = $targetWorkspaceName !== null ? $this->workspaceRepository->findOneByName($targetWorkspaceName) : null;
        $this->publishingService->publishNodes($nodes, $targetWorkspace);
        $this->throwStatus(204, 'Nodes published', '');
    }