Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php
public function discardNodeAction(NodeInterface $node, Workspace $selectedWorkspace)
    {
        // Hint: we cannot use $node->remove() here, as this removes the node recursively (but we just want to *discard changes*)
        $this->publishingService->discardNode($node);
        $this->addFlashMessage($this->translator->translateById('workspaces.selectedChangeHasBeenDiscarded', [], null, null, 'Modules', 'Neos.Neos'));
        $this->redirect('show', null, null, ['workspace' => $selectedWorkspace]);
    }
public function discardNodeAction(NodeInterface $node, Workspace $selectedWorkspace)
    {
        // Hint: we cannot use $node->remove() here, as this removes the node recursively (but we just want to *discard changes*)
        $this->publishingService->discardNode($node);
        $this->addFlashMessage($this->translator->translateById('workspaces.selectedChangeHasBeenDiscarded', [], null, null, 'Modules', 'Neos.Neos'));
        $this->redirect('show', null, null, ['workspace' => $selectedWorkspace]);
    }
public function discardNodeAction ( NodeInterface $ node , Workspace $ selectedWorkspace ) { // Hint: we cannot use $node->remove() here, as this removes the node recursively (but we just want to *discard changes*) $ this -> publishingService -> discardNode ( $ node ) ; $ this -> addFlashMessage ( $ this -> translator -> translateById ( 'workspaces.selectedChangeHasBeenDiscarded' , [ ] , null , null , 'Modules' , 'Neos.Neos' ) ) ; $ this -> redirect ( 'show' , null , null , [ 'workspace' => $ selectedWorkspace ] ) ; }
Discard a a single node

@param NodeInterface $node
@param Workspace $selectedWorkspace
@throws WorkspaceException
Discard a a single node