2017 © Pedro Peláez
 

library cflashmessage

Class for flash messages.

image

frjf14/cflashmessage

Class for flash messages.

  • Saturday, December 6, 2014
  • by frjf14
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Scrutinizer Code Quality Code Coverage Build Status, (*1)

Flash messages - Anax MVC

cflashmessage handles error, success, notice and warning messages, which can be used to give the user feedback., (*2)

License

This software is free software and carries a MIT license., (*3)

How to use flash messages

Adding it as shared service in the frontcontroller., (*4)

$di->setShared('flashmessage', function() { $flashmessage = new \frjf14\FlashMessage\CFlashMessage(); return $flashmessage; });, (*5)

From the package Copy the css file: frjf14/cflashmessage/src/css/flashmessage.css to the webroot css folder: webroot/css/ then add the css to the frontcontroller $app->theme->addStylesheet('css/flashmessage.css'); or just link directly to the CSS file within the package $app->theme->addStylesheet('../vendor/frjf14/cflashmessage/src/css/flashmessage.css');, (*6)

Now you can add flash messages as an example error message: $app->flashmessage->addError('An error message.'); and to display the message use $app->flashmessage->getFlashMessages(); to retrive the message(s) as html., (*7)

The Versions

06/12 2014

dev-master

9999999-dev

Class for flash messages.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Fredrik Johansson

message flashmessage flash