Neos.ContentRepository/Classes/Domain/Model/Workspace.php
public function publish(Workspace $targetWorkspace)
    {
        $sourceNodes = $this->publishingService->getUnpublishedNodes($this);
        $this->publishNodes($sourceNodes, $targetWorkspace);
    }
public function publish(Workspace $targetWorkspace)
    {
        $sourceNodes = $this->publishingService->getUnpublishedNodes($this);
        $this->publishNodes($sourceNodes, $targetWorkspace);
    }
public function publish ( Workspace $ targetWorkspace ) { $ sourceNodes = $ this -> publishingService -> getUnpublishedNodes ( $ this ) ; $ this -> publishNodes ( $ sourceNodes , $ targetWorkspace ) ; }
Publishes the content of this workspace to another workspace.

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

@param Workspace $targetWorkspace The workspace to publish to
@return void
@api
Publishes the content of this workspace to another workspace .