Is there a message helper?

Permalink
In dashboard pages I have been using the validation helper
Loader::helper('validation/error');

to note and display error messages.

Just wondering - Is there a similar helper mechanism for showing success messages? (to date I have been writing an appropriately styled div the long way).

JohntheFish
 
jbx replied on at Permalink Reply
jbx
Nope - don't think so.

My personal approach is something like
if (!$e->has()) {
    $this->set('message', 'Success!');
}


Jon
olliephillips replied on at Permalink Reply
olliephillips
No, do you need this? Error object can be augmented for multiple errors to direct user at everything that went wrong. But success is just success ;-)
jordanlev replied on at Permalink Best Answer Reply
jordanlev
If you're in a dashboard page, you can just do $this->set('message', 'Your message here'); -- and it will display that (you don't need to worry about outputting the message in your own view code -- the dashboard theme already handles that).
If you're not in the dashboard, though, then no you will need to output your own messages somehow.