Neos.Neos/Classes/Command/WorkspaceCommandController.php
public function listCommand()
    {
        $workspaces = $this->workspaceRepository->findAll();

        if ($workspaces->count() === 0) {
            $this->outputLine('No workspaces found.');
            $this->quit(0);
        }

        $tableRows = [];
        $headerRow = ['Name', 'Base Workspace', 'Title', 'Owner', 'Description'];

        foreach ($workspaces as $workspace) {
            $owner = $workspace->getOwner() ? $workspace->getOwner()->getName() : '';
            $tableRows[] = [$workspace->getName(), ($workspace->getBaseWorkspace() ? $workspace->getBaseWorkspace()->getName() : ''), $workspace->getTitle(), $owner, $workspace->getDescription()];
        }
        $this->output->outputTable($tableRows, $headerRow);
    }
public function listCommand()
    {
        $workspaces = $this->workspaceRepository->findAll();

        if ($workspaces->count() === 0) {
            $this->outputLine('No workspaces found.');
            $this->quit(0);
        }

        $tableRows = [];
        $headerRow = ['Name', 'Base Workspace', 'Title', 'Owner', 'Description'];

        foreach ($workspaces as $workspace) {
            $owner = $workspace->getOwner() ? $workspace->getOwner()->getName() : '';
            $tableRows[] = [$workspace->getName(), ($workspace->getBaseWorkspace() ? $workspace->getBaseWorkspace()->getName() : ''), $workspace->getTitle(), $owner, $workspace->getDescription()];
        }
        $this->output->outputTable($tableRows, $headerRow);
    }
public function listCommand ( ) { $ workspaces = $ this -> workspaceRepository -> findAll ( ) ; if ( $ workspaces -> count ( ) === 0 ) { $ this -> outputLine ( 'No workspaces found.' ) ; $ this -> quit ( 0 ) ; } $ tableRows = [ ] ; $ headerRow = [ 'Name' , 'Base Workspace' , 'Title' , 'Owner' , 'Description' ] ; foreach ( $ workspaces as $ workspace ) { $ owner = $ workspace -> getOwner ( ) ? $ workspace -> getOwner ( ) -> getName ( ) : '' ; $ tableRows [ ] = [ $ workspace -> getName ( ) , ( $ workspace -> getBaseWorkspace ( ) ? $ workspace -> getBaseWorkspace ( ) -> getName ( ) : '' ) , $ workspace -> getTitle ( ) , $ owner , $ workspace -> getDescription ( ) ] ; } $ this -> output -> outputTable ( $ tableRows , $ headerRow ) ; }
Display a list of existing workspaces

@return void
Display a list of existing workspaces