Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php
protected function prepareBaseWorkspaceOptions(Workspace $excludedWorkspace = null)
    {
        $baseWorkspaceOptions = [];
        foreach ($this->workspaceRepository->findAll() as $workspace) {
            /** @var Workspace $workspace */
            if (!$workspace->isPersonalWorkspace() && $workspace !== $excludedWorkspace && ($workspace->isPublicWorkspace() || $workspace->isInternalWorkspace() || $this->userService->currentUserCanManageWorkspace($workspace))) {
                $baseWorkspaceOptions[$workspace->getName()] = $workspace->getTitle();
            }
        }

        return $baseWorkspaceOptions;
    }
protected function prepareBaseWorkspaceOptions(Workspace $excludedWorkspace = null)
    {
        $baseWorkspaceOptions = [];
        foreach ($this->workspaceRepository->findAll() as $workspace) {
            /** @var Workspace $workspace */
            if (!$workspace->isPersonalWorkspace() && $workspace !== $excludedWorkspace && ($workspace->isPublicWorkspace() || $workspace->isInternalWorkspace() || $this->userService->currentUserCanManageWorkspace($workspace))) {
                $baseWorkspaceOptions[$workspace->getName()] = $workspace->getTitle();
            }
        }

        return $baseWorkspaceOptions;
    }
protected function prepareBaseWorkspaceOptions ( Workspace $ excludedWorkspace = null ) { $ baseWorkspaceOptions = [ ] ; foreach ( $ this -> workspaceRepository -> findAll ( ) as $ workspace ) { /** @var Workspace $workspace */ if ( ! $ workspace -> isPersonalWorkspace ( ) && $ workspace !== $ excludedWorkspace && ( $ workspace -> isPublicWorkspace ( ) || $ workspace -> isInternalWorkspace ( ) || $ this -> userService -> currentUserCanManageWorkspace ( $ workspace ) ) ) { $ baseWorkspaceOptions [ $ workspace -> getName ( ) ] = $ workspace -> getTitle ( ) ; } } return $ baseWorkspaceOptions ; }
Creates an array of workspace names and their respective titles which are possible base workspaces for other
workspaces.

@param Workspace $excludedWorkspace If set, this workspace will be excluded from the list of returned workspaces
@return array
Creates an array of workspace names and their respective titles which are possible base workspaces for other workspaces .