/** * 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'); }
/** * Update a workspace * * @param Workspace $workspace A workspace to update * @return void */ public function updateAction(Workspace $workspace) { if ($workspace->getTitle() === '') { $workspace->setTitle($workspace->getName()); } $this->workspaceRepository->update($workspace); $this->addFlashMessage($this->translator->translateById('workspaces.workspaceHasBeenUpdated', [$workspace->getTitle()], null, null, 'Modules', 'TYPO3.Neos')); $this->redirect('index'); }