/** * Removes all personal workspaces of the given user's account if these workspaces exist. Also removes * all possibly existing content of these workspaces. * * @param string $accountIdentifier Identifier of the user's account * @return void */ protected function deletePersonalWorkspace($accountIdentifier) { $userWorkspace = $this->workspaceRepository->findByIdentifier(UserUtility::getPersonalWorkspaceNameForUsername($accountIdentifier)); if ($userWorkspace instanceof Workspace) { $this->publishingService->discardAllNodes($userWorkspace); $this->workspaceRepository->remove($userWorkspace); } }
/** * Discard everything in the workspace with the given workspace name * * @param Workspace $workspace * @return void */ public function discardAllAction($workspace) { $this->publishingService->discardAllNodes($workspace); $this->throwStatus(204, 'Workspace changes have been discarded', ''); }