2017 © Pedro PelĂĄez
 

library flashmsg

Message controller for ANAX-MVC

image

helikopterspark/flashmsg

Message controller for ANAX-MVC

  • Tuesday, November 24, 2015
  • by helikopterspark
  • Repository
  • 1 Watchers
  • 0 Stars
  • 45 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

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

FlashMessage

This is a module for the Anax-MVC web framework. The module has been developed as a part of a course on Blekinge Tekniska Högskola., (*2)

Flash messages are used to display status messages, results of actions or notices. Use this component to generate these types of messages., (*3)

The class FlashMsg uses the session service in Anax-MVC to store the messages until the array is cleared., (*4)

Installation

  1. To install, use composer.
  2. Add this line into your composer.json file:
"require": {"helikopterspark/flashmsg": "dev-master"}
  1. Move or copy the css/flashmsg.css file to the webroot/css folder in your Anax-MVC installation. Modify it to your liking.
  2. In the router you also need to add the css-stylesheet flashmsg.css.
  3. You can move or copy the file flashmessages.php to your webroot to test in a web browser.

Access the controller in your frontcontroller:

$di->setShared('flashmessage', function() use ($di){
    $flashMessages = new \helikopterspark\FlashMsg\FlashMsg();
    $flashMessages->setDI($di);
    return $flashMessages;
});

Add the route in your frontcontroller:

$app->router->add('', function() use ($app) {
    $app->theme->addStylesheet('css/flashmsg.css');
    $app->theme->setTitle("Flash messages");

    $app->flashmessage->alert('Alert');
    $app->flashmessage->error('Error');
    $app->flashmessage->info('Info');
    $app->flashmessage->notice('Notice');
    $app->flashmessage->success('Success');
    $app->flashmessage->warning('Warning');

    $app->views->add('theme/index', ['content' => $app->flashmessage->outputMsgs()]);

    $app->flashmessage->clearMessages();

});

The Versions

24/11 2015

dev-master

9999999-dev http://dbwebb.se

Message controller for ANAX-MVC

  Sources   Download

MIT

The Requires

 

flashmessage flashmsg

24/11 2015

v2.0

2.0.0.0 http://dbwebb.se

Message controller for ANAX-MVC

  Sources   Download

MIT

The Requires

 

flashmessage flashmsg

16/11 2015

v1.0

1.0.0.0 http://dbwebb.se

Message controller for ANAX-MVC

  Sources   Download

MIT

The Requires

  • php >=5.4

 

flashmessage flashmsg