Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notification Component

Version MIT License Quality Score

Notification component for storing and retrieving flash data.

Installation

composer require flextype-components/notification

Usage

use Flextype\Component\Notification\Notification;

Initializes the Notification service.
This will read notification/flash data from the $_SESSION variable and load it into the $this->previous array.

Notification::init();

Returns a specific variable from the Notifications array.

echo Notification::get('success');
echo Notification::get('errors');

Adds specific variable to the Notifications array.

Notification::set('success', 'Data has been saved with success!');
Notification::set('errors', 'Data not saved!');

Adds specific variable to the Notifications array for current page.

Notification::setNow('success', 'Success!');

Clears the Notifications array.
Data that previous pages stored will not be deleted, just the data that this page stored itself.

Notification::clean();

License

See LICENSE

About

Notification component for storing and retrieving flash data.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages