Download the PHP package stagem/zfc-flash without Composer
On this page you can find all versions of the php package stagem/zfc-flash. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download stagem/zfc-flash
More information about stagem/zfc-flash
Files in stagem/zfc-flash
Package zfc-flash
Short Description ZF Adapters for different Flash Managers
License MIT
Informations about the package zfc-flash
Zfc Flash
ZF Adapters for different Flash Managers
There are many FLash Messages implementation and all of them have different interfaces.
This plugin provide one FlashInterface
which allow write custom Adapter
for any Flash library.
By default this package uses slim/flash
.
Package has several registered namespace which allow group massages and show beauty html markup for all of them.
- default
- success
- warning
- error
- info
Installation
In Expressive
You should enable module in config/config.php
as Stagem\ZfcFlash\ConfigProvider::class
and register middleware inconfig/pipeline.php
This allow gets flash object from request as $flash = $request->getAttribute('flash');
Usage
In Expressive
Out of the box this module works with Zend\View\Helper\FlashMessenger
and twitter bootstrap
Include flash-messages
template in your template as <?= $this->partial('widget::flash-messages') ?>
If you want change html markup or style see section Custom Flash.
Custom Flash
Be carefully, you should enable your module after Stagem\ZfcFlash\ConfigProvider::class
in config/config.php
You can develop custom adapter for any Flash Messages
only implement Stagem\ZfcFlash\FlashInterface
and register in depenencies
in your config/module.config.php
Custom template
Create new .phtml file, get messages and implement custom html markup.
You can use current
helper or other approach for get Request
object
and than get the flash
.
After that add your template to config/module.config.php
and include in template