0

Based on this question:. https://joomla.stackexchange.com/a/24042/8968

I want to add the return code as a message after save to see if it was successful or not.

Can someone tell how I can do this?

Here is my Code:

class plgContentBk_onsave extends JPlugin
{

public function onContentAfterSave ($context, $article, $isNew)
{
// Do something
[Send a message after save]
return true;    
}
}
3
  • Please write your snippet from the other page directly here so that future researchers don't have to page jump to get the full story. Jan 11, 2019 at 11:30
  • Please undelete your most recent question. By sharing your experience, other Joomla users can benefit. The right thing to do is to post a complete and educational answer to your own question. Jan 11, 2019 at 14:56

1 Answer 1

2
$this->app->enqueueMessage($message, $type);

Where $message is the message string and $type is an optional type (message, warning, error or notice; defaults to message).

1
  • Thx: $application->enqueueMessage(JText::_($message), 'notice'); works for me
    – Lovntola
    Jan 11, 2019 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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