Wallogit.com
2017 © Pedro Peláez
Class to handle messages like debug, error, sucess or warning
This is a message module for Anax-MVC. Can be used outside of anax too. Handles debug, error, success and warning messages/status. For Anax MVC, see https://github.com/mosbth/Anax-MVC., (*1)
This software is free software and carries a MIT license., (*2)
First you need a area on your page where Flashingmessage can show the div elements. In anax mvc use this:, (*3)
File: /theme/anax-base/index.tpl.php, (*4)
views->hasContent('status')) : ?>Then you need to add Flashingmessage to your CDIFacrotyDefault:, (*5)
$this->setShared('StatusMessage', function() { $module = new \TBM\StatusMessage\CStatusMessage($this); //$module->setDI($this); return $module; });, (*6)
Then for displaying Flashingmessage on your page copy this to your code., (*7)
$status = $app->StatusMessage; $app->views->addString($status->messagesHtml(), 'status');, (*8)
Then you can choose between four different messages:, (*9)
addDebugMessage($message) addErrorMessage($message) addSuccessMessage($message) addWarningMessage($message), (*10)
. ..: Created by Emma Wiklund, wiklund_e@hotmail.com