An open API service indexing awesome lists of open source software.

https://github.com/derekisbusy/yii2-flash-growl

Display flash messages using growls.
https://github.com/derekisbusy/yii2-flash-growl

flash-messages growl growl-notifications growler

Last synced: 2 months ago
JSON representation

Display flash messages using growls.

Awesome Lists containing this project

README

        

Growl Flash Messages
====================

[![Packagist](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://github.com/derekisbusy/yii2-flash-growl/blob/master/LICENSE.md)
[![Packagist](https://img.shields.io/packagist/dt/derekisbusy/yii2-flash-growl.svg)](https://packagist.org/packages/derekisbusy/yii2-flash-growl)

Widget to output flash messages as growls.

Installation
------------

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require --prefer-dist derekisbusy/yii2-flash-growl "1.*"
```

or add

```
"derekisbusy/yii2-flash-growl": "1.*"
```

to the require section of your `composer.json` file.

Usage
-----

Once the extension is installed, simply use it in your code by :

```php

// add flash messages under category growl...
Yii::$app->getSession()->addFlash('growl', [
'type' => 'success',
'duration' => 1500,
'icon' => 'fa fa-success',
'title' => 'Success!',
'message' => 'Action has been performed.',
]);

// Display growls in your view...
echo \derekisbusy\growl\FlashGrowlWidget::widget();

// Or render the _growl view in the controller if you only need to render the growls...
return $this->renderAjax('@derekisbusy/yii2-growl/_growl');

```