Ejemplo n.º 1
0
 /**
  * @param string $workspaceName
  * @return void
  */
 public function discardWorkspaceAction($workspaceName)
 {
     foreach ($this->workspacesService->getUnpublishedNodes($workspaceName) as $node) {
         if ($node->getPath() !== '/') {
             $this->nodeRepository->remove($node);
         }
     }
     $this->flashMessageContainer->addMessage(new \TYPO3\FLOW3\Error\Message('Changes in workspace "%s" have been discarded', NULL, array($workspaceName)));
     $this->redirect('index');
 }