-
Notifications
You must be signed in to change notification settings - Fork 11
FlashMessenger
ronaldbaltus edited this page Mar 4, 2013
·
2 revisions
The sxbFlashMessenger displays a message trough the controller and combines them when the type is the same . Unlike the [sxbAlert] (https://github.com/RWOverdijk/SxBootstrap/wiki/Alert), the sxbFlashMessenger gets called trough the controller.
<?php
$this->sxbFlashMessenger($namespace);
$this->sxbFlashMessenger(array($namespace1, $namespace2));
?><?php
// namespace, isBlock
$this->sxbFlashMessenger($namespace, $isBlock);
?><?php
$this->flashMessenger()->addSuccessMessage('This is a notice');
?>- addInfoMessage
- addSuccesstMessage
- addWarningMessage
- addErrorMessage
If you want to use the addWarningMessage() you'll need to overide the default flashMessenger:
'controller_plugins' => array(
'invokables' => array(
'flashMessenger' => 'SxBootstrap\Controller\Plugin\FlashMessenger'
)
),<?php
echo $this->sxbFlashMessenger();
?>