Neos.Neos/Classes/Service/Controller/WorkspaceController.php
public function publishAllAction($sourceWorkspaceName, $targetWorkspaceName)
    {
        $sourceWorkspace = $this->workspaceRepository->findOneByName($sourceWorkspaceName);
        $targetWorkspace = $this->workspaceRepository->findOneByName($targetWorkspaceName);
        if ($sourceWorkspace === null) {
            $this->throwStatus(400, 'Invalid source workspace');
        }
        if ($targetWorkspace === null) {
            $this->throwStatus(400, 'Invalid target workspace');
        }
        $this->publishingService->publishNodes($this->publishingService->getUnpublishedNodes($sourceWorkspace), $targetWorkspace);

        $this->throwStatus(204, sprintf('All changes in workspace %s have been published to %s', $sourceWorkspaceName, $targetWorkspaceName), '');
    }
public function publishAllAction($sourceWorkspaceName, $targetWorkspaceName)
    {
        $sourceWorkspace = $this->workspaceRepository->findOneByName($sourceWorkspaceName);
        $targetWorkspace = $this->workspaceRepository->findOneByName($targetWorkspaceName);
        if ($sourceWorkspace === null) {
            $this->throwStatus(400, 'Invalid source workspace');
        }
        if ($targetWorkspace === null) {
            $this->throwStatus(400, 'Invalid target workspace');
        }
        $this->publishingService->publishNodes($this->publishingService->getUnpublishedNodes($sourceWorkspace), $targetWorkspace);

        $this->throwStatus(204, sprintf('All changes in workspace %s have been published to %s', $sourceWorkspaceName, $targetWorkspaceName), '');
    }
public function publishAllAction ( $ sourceWorkspaceName , $ targetWorkspaceName ) { $ sourceWorkspace = $ this -> workspaceRepository -> findOneByName ( $ sourceWorkspaceName ) ; $ targetWorkspace = $ this -> workspaceRepository -> findOneByName ( $ targetWorkspaceName ) ; if ( $ sourceWorkspace === null ) { $ this -> throwStatus ( 400 , 'Invalid source workspace' ) ; } if ( $ targetWorkspace === null ) { $ this -> throwStatus ( 400 , 'Invalid target workspace' ) ; } $ this -> publishingService -> publishNodes ( $ this -> publishingService -> getUnpublishedNodes ( $ sourceWorkspace ) , $ targetWorkspace ) ; $ this -> throwStatus ( 204 , sprintf ( 'All changes in workspace %s have been published to %s' , $ sourceWorkspaceName , $ targetWorkspaceName ) , '' ) ; }
Publish everything in the workspace with the given workspace name

@param string $sourceWorkspaceName Name of the source workspace containing the content to publish
@param string $targetWorkspaceName Name of the target workspace the content should be published to
@return void
Publish everything in the workspace with the given workspace name