Neos.ContentRepository/Classes/Domain/Model/Workspace.php
public function publishNodes(array $nodes, Workspace $targetWorkspace)
    {
        foreach ($nodes as $node) {
            $this->publishNode($node, $targetWorkspace);
        }
    }
public function publishNodes(array $nodes, Workspace $targetWorkspace)
    {
        foreach ($nodes as $node) {
            $this->publishNode($node, $targetWorkspace);
        }
    }
public function publishNodes ( array $ nodes , Workspace $ targetWorkspace ) { foreach ( $ nodes as $ node ) { $ this -> publishNode ( $ node , $ targetWorkspace ) ; } }
Publishes the given nodes to the target workspace.

The specified workspace must be a base workspace of this workspace.

@param array<\Neos\ContentRepository\Domain\Model\NodeInterface> $nodes
@param Workspace $targetWorkspace The workspace to publish to
@return void
@api
Publishes the given nodes to the target workspace .