Tuesday, May 15, 2012

Zend Notification

Zend built in notification are divided into session saved message, and current message.
$flashmsg = Zend_Controller_Action_HelperBroker::getStaticHelper('FlashMessenger');

To get last added message in previous request (which is saved in the session):
$aMsg = $flashmsg->getMessages();

To clear the messages storage:
To get current added message (same request):

$aMsg = $flashmsg->getCurrentMessages();

To clear the current messages storage:

Please note that the current and the session message are separated, and need to be called respectively to retrieve all messages in the notification

No comments: