enqueueMessage a message with type success or message in a CLI application
message displayed as success in bright green
message displayed as comment
CMSApplicationInterface::MSG_SUCCESS is not defined at all.
layouts/joomla/system/message.php does not map MSG_SUCCESS but here it work as the $type itself is used as fallback.
the $methodmap in ConsoleApplication::doExecute does not map 'success' nor 'message'
I have an installer script using enqueueMessage , would be nice to have the information colored in the CLI as well.
Labels |
Added:
No Code Attached Yet
|
I'm looking at scripts that are designed to run in the Administror/Site Applications using enqueuMesage. In this case installation scripts.
The method ConsoleApplication::doExecute maps the types in the message queue to SymfonyStyle methods, however the methodMap is incomplete (compared to the joomla.system.message layout) and missing the success and message types.
I could rewrite my own installation scripts to distinguish between a Console and Administrator application, however, I do not control other packages. And ConsoleApplication::doExecute is designed to do the work for me.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-06-21 08:05:37 |
Closed_By | ⇒ | alikon |
you can do like this
joomla-cms/libraries/src/Console/AddUserCommand.php
Line 175 in dd08e28