Download the PHP package loveorigami/yii2-notification-wrapper without Composer
On this page you can find all versions of the php package loveorigami/yii2-notification-wrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download loveorigami/yii2-notification-wrapper
More information about loveorigami/yii2-notification-wrapper
Files in loveorigami/yii2-notification-wrapper
Package yii2-notification-wrapper
Short Description This module for renders a message from session flash (with ajax, pjax support and etc.)
License MIT
Homepage https://github.com/loveorigami/yii2-notification-wrapper
Informations about the package yii2-notification-wrapper
Yii2-notification-wrapper
Yii2-notification-wrapper module renders a message from session flash (with ajax support). All flash messages are displayed in the sequence they were assigned using setFlash.
You can set message as following:
Installation
The preferred way to install this extension is through composer.
To install with bower package for one of supported layers, either run
or add
to the section of your composer.json
file.
Configure application
Let's start with defining module in our config file (@common/config/main.php
):
That's all, now you have module installed and configured.
Usage
This package comes with a Wrapper widget that can be used to regularly poll the server for new notifications and trigger them visually using either Noty (or Toastr, or Growl etc.).
This widget should be used in your main layout file as follows:
Advanced usage
Every layer may be customizable from parameter in the widget. For more information - read documentation.
Some libraries can override System Confirm for links as:
Custom title
If you want change notification title, you can use in our messages
and set message in action as
Layer Id
If you want paste notification message in custom div, you can use . For example:
Disable showNoty after ajax calls
-
In Ajax script
- In Pjax
Noty Exceptions
For example:
Supported layers
Currently supported layers are:
Full installation
Add
to the section of your composer.json
file.
License
Yii2-notification-wrapper is released under the MIT License. See the bundled LICENSE.md for details.