/** * @param array<\TYPO3\FLOW3\Cli\Command> $commands * @return void */ protected function displayShortHelpForCommands(array $commands) { $commandsByPackagesAndControllers = $this->buildCommandsIndex($commands); foreach ($commandsByPackagesAndControllers as $packageKey => $commandControllers) { $this->outputLine(''); $this->outputLine('PACKAGE "%s":', array(strtoupper($packageKey))); $this->outputLine(str_repeat('-', self::MAXIMUM_LINE_LENGTH)); foreach ($commandControllers as $commands) { foreach ($commands as $command) { $description = wordwrap($command->getShortDescription(), self::MAXIMUM_LINE_LENGTH - 43, PHP_EOL . str_repeat(' ', 43), TRUE); $shortCommandIdentifier = $this->commandManager->getShortestIdentifierForCommand($command); $compileTimeSymbol = $this->bootstrap->isCompileTimeCommand($shortCommandIdentifier) ? '*' : ''; $this->outputLine('%-2s%-40s %s', array($compileTimeSymbol, $shortCommandIdentifier, $description)); } $this->outputLine(); } } }