Download the PHP package szmnmichalowski/szm-noty without Composer
On this page you can find all versions of the php package szmnmichalowski/szm-noty. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download szmnmichalowski/szm-noty
More information about szmnmichalowski/szm-noty
Files in szmnmichalowski/szm-noty
Package szm-noty
Short Description jQuery plugin to notifications for Zend Framework 2/3
License MIT
Homepage https://github.com/szmnmichalowski/SzmNoty
Informations about the package szm-noty
SzmNoty
SzmNoty is a Zend Framework 2/3 view helper integerated with jQyert Noty) plugin to render notifications from SzmNotification controller plugin.
Installation
You can install this module via composer
1. Add this project into your composer.json
2. Update your dependencies
3. Add module to your application.config.php.
Configuration
Copy szm-noty/config/noty.local.php.dist
file to root config/autoload
and rename to noty.local.php
(remove .dist
extension)
Configuration file should looks like this:
default_options
- Options for all types of notifications.
types
- Options for specific type of notifications (success
may have different options then error
)
Full list of options you can find on http://ned.im/noty/options.html
Usage
If you need detailed informations how to add notification in controller visit SzmNotification module.
In controller:
Then in your layout or view:
In result, you should see notifications as on image above
Available methods
List of available methods:
setIncludeLibrary()
- Iftrue
then link to noty's library will be attached. Use it if you didn't add path to library manually. Defaultfalse
render(string $type = null, $options = [])
- Render notifications from previous request. If no parameters are provided then it displays all notifications with options provided in config filerenderCurrent(string $type = null, $options = [])
- Same as above with one difference. It render notifications added during this request.