Skip to content
Snippets Groups Projects
Commit 9378f993 authored by Georg Ringer's avatar Georg Ringer Committed by Andreas Fernandez
Browse files

[TASK] Show command of console commands in backend

Show the console command and arguments in the backend of symfony commands.

Resolves: #88788
Releases: master, 9.5
Change-Id: Ief0abb4404c14dbfa85eb4acddcb74e796ba0272
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61316


Tested-by: default avatarBenjamin Franzke <bfr@qbus.de>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarSybille Peters <sypets@gmx.de>
Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarBenjamin Franzke <bfr@qbus.de>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
parent 7a2e7846
Branches
Tags
No related merge requests found
......@@ -90,6 +90,34 @@ class ExecuteSchedulableCommandTask extends AbstractTask
return $schedulableCommand->run($input, $output) === 0;
}
/**
* Return a text representation of the selected command and arguments
*
* @return string Information to display
*/
public function getAdditionalInformation(): string
{
$label = $this->commandIdentifier;
try {
$commandRegistry = GeneralUtility::makeInstance(CommandRegistry::class);
$schedulableCommand = $commandRegistry->getCommandByIdentifier($this->commandIdentifier);
} catch (UnknownCommandException $e) {
return sprintf(
$this->getLanguageService()->sL('LLL:EXT:scheduler/Resources/Private/Language/locallang.xlf:msg.unregisteredCommand'),
$this->commandIdentifier
);
}
$input = new ArrayInput($this->getArguments(), $schedulableCommand->getDefinition());
$arguments = $input->__toString();
if ($arguments !== '') {
$label .= ' ' . $arguments;
}
return $label;
}
/**
* @return array
*/
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment