2

I have noticied that method enqueueMessage() from JApplication has been marked as deprecated, but what is the replacement method for that ?

Thanks by advance

0

The entire JApplication class has been marked deprecated. Instead, you need to use JApplicationCms.

So to display an alert, you can use the following:

$app = JApplicationCms::getInstance('site');
$app->enqueueMessage('My Message here', 'success');
2

It's not deprecated on JApplicationCms, the best way to call it would be:

$app = JFactory::getApplication()
$app->enqueueMessage('My Message here', 'success');

See https://api.joomla.org/cms-3/classes/JFactory.html#method_getApplication for more details and to see that it returns JApplicationCms

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.