Neos\Neos\Command\WorkspaceCommandController::listCommand PHP Метод

listCommand() публичный Метод

Display a list of existing workspaces
public listCommand ( ) : void
Результат void
    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);
    }