derekisbusy/yii2-flash-growl

Widget to output all flash messages as growls.

Installs: 416

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0.0 2017-02-25 17:05 UTC

This package is not auto-updated.

Last update: 2024-12-22 02:55:58 UTC


README

Packagist Packagist

Widget to output flash messages as growls.

Installation

The preferred way to install this extension is through composer.

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 :

// 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');