/**
  * Publishes the whole workspace
  *
  * @param Workspace $workspace
  * @return void
  */
 public function publishWorkspaceAction(Workspace $workspace)
 {
     if (($targetWorkspace = $workspace->getBaseWorkspace()) === null) {
         $targetWorkspace = $this->workspaceRepository->findOneByName('live');
     }
     $workspace->publish($targetWorkspace);
     $this->addFlashMessage($this->translator->translateById('workspaces.allChangesInWorkspaceHaveBeenPublished', [htmlspecialchars($workspace->getTitle()), htmlspecialchars($targetWorkspace->getTitle())], null, null, 'Modules', 'TYPO3.Neos'));
     $this->redirect('index');
 }
 /**
  * Publishes the whole workspace
  *
  * @param Workspace $workspace
  * @return void
  */
 public function publishWorkspaceAction(Workspace $workspace)
 {
     $liveWorkspace = $this->workspaceRepository->findOneByName('live');
     $workspace->publish($liveWorkspace);
     $this->addFlashMessage('Changes in workspace "%s" have been published', 'Changes published', Message::SEVERITY_OK, array($workspace->getName()), 1412420808);
     $this->redirect('index');
 }