Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php
public function discardWorkspaceAction(Workspace $workspace)
    {
        $unpublishedNodes = $this->publishingService->getUnpublishedNodes($workspace);
        $this->publishingService->discardNodes($unpublishedNodes);
        $this->addFlashMessage($this->translator->translateById('workspaces.allChangesInWorkspaceHaveBeenDiscarded', [htmlspecialchars($workspace->getTitle())], null, null, 'Modules', 'Neos.Neos'));
        $this->redirect('index');
    }
public function discardWorkspaceAction(Workspace $workspace)
    {
        $unpublishedNodes = $this->publishingService->getUnpublishedNodes($workspace);
        $this->publishingService->discardNodes($unpublishedNodes);
        $this->addFlashMessage($this->translator->translateById('workspaces.allChangesInWorkspaceHaveBeenDiscarded', [htmlspecialchars($workspace->getTitle())], null, null, 'Modules', 'Neos.Neos'));
        $this->redirect('index');
    }
public function discardWorkspaceAction ( Workspace $ workspace ) { $ unpublishedNodes = $ this -> publishingService -> getUnpublishedNodes ( $ workspace ) ; $ this -> publishingService -> discardNodes ( $ unpublishedNodes ) ; $ this -> addFlashMessage ( $ this -> translator -> translateById ( 'workspaces.allChangesInWorkspaceHaveBeenDiscarded' , [ htmlspecialchars ( $ workspace -> getTitle ( ) ) ] , null , null , 'Modules' , 'Neos.Neos' ) ) ; $ this -> redirect ( 'index' ) ; }
Discards content of the whole workspace

@param Workspace $workspace
@return void
Discards content of the whole workspace