2017 © Pedro Peláez
 

yii2-extension yii2-widget-alert

A widget to generate alert based notifications using bootstrap-alert plugin (sub repo split from yii2-widgets)

image

kartik-v/yii2-widget-alert

A widget to generate alert based notifications using bootstrap-alert plugin (sub repo split from yii2-widgets)

  • Wednesday, February 7, 2018
  • by kartik-v
  • Repository
  • 1 Watchers
  • 19 Stars
  • 733,919 Installations
  • PHP
  • 34 Dependents
  • 0 Suggesters
  • 8 Forks
  • 6 Open issues
  • 6 Versions
  • 9 % Grown

The README.md

Krajee Logo
yii2-widget-alert
Donate       kartikv

[![Stable Version](https://poser.pugx.org/kartik-v/yii2-widget-alert/v/stable)](https://packagist.org/packages/kartik-v/yii2-widget-alert) [![Unstable Version](https://poser.pugx.org/kartik-v/yii2-widget-alert/v/unstable)](https://packagist.org/packages/kartik-v/yii2-widget-alert) [![License](https://poser.pugx.org/kartik-v/yii2-widget-alert/license)](https://packagist.org/packages/kartik-v/yii2-widget-alert) [![Total Downloads](https://poser.pugx.org/kartik-v/yii2-widget-alert/downloads)](https://packagist.org/packages/kartik-v/yii2-widget-alert) [![Monthly Downloads](https://poser.pugx.org/kartik-v/yii2-widget-alert/d/monthly)](https://packagist.org/packages/kartik-v/yii2-widget-alert) [![Daily Downloads](https://poser.pugx.org/kartik-v/yii2-widget-alert/d/daily)](https://packagist.org/packages/kartik-v/yii2-widget-alert)

This extension contains a couple of useful widgets. The Alert widget extends the \yii\bootstrap\Alert widget with more easy styling and auto fade out options. In addition, it includes a AlertBlock widget that groups multiple \kartik\widget\Alert or kartik\widget\Growl widgets in one single block and renders them stacked vertically on the current page. You can choose the TYPE_ALERT style or the TYPE_GROWL style for your notifications. You can also set the widget to automatically read and display session flash messages (which is the default setting). Alternatively, you can setup and configure your own block of custom alerts., (*1)

NOTE: This extension is a sub repo split of yii2-widgets. The split has been done since 08-Nov-2014 to allow developers to install this specific widget in isolation if needed. One can also use the extension the previous way with the whole suite of yii2-widgets., (*2)

Installation

The preferred way to install this extension is through composer. Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the minimum-stability settings for your application's composer.json., (*3)

To install, either run, (*4)

$ php composer.phar require kartik-v/yii2-widget-alert "*"

or add, (*5)

"kartik-v/yii2-widget-alert": "*"

to the require section of your composer.json file., (*6)

NOTE: Using Growl is optional and it is not automatically installed with this extension. If you want to use it in your project, you need to either run, (*7)

$ php composer.phar require kartik-v/yii2-widget-growl "*"

or add, (*8)

"kartik-v/yii2-widget-growl": "*"

to the require section of your composer.json file., (*9)

Refer the CHANGE LOG for details on changes to various releases., (*10)

Demo

You can refer detailed documentation and demos for Alert and AlertBlock widgets on usage of the extension., (*11)

Usage

Alert

use kartik\alert\Alert;

echo Alert::widget([
    'type' => Alert::TYPE_INFO,
    'title' => 'Note',
    'titleOptions' => ['icon' => 'info-sign'],
    'body' => 'This is an informative alert'
]);

AlertBlock

use kartik\alert\AlertBlock;

echo AlertBlock::widget([
    'type' => AlertBlock::TYPE_ALERT,
    'useSessionFlash' => true
]);

License

yii2-widget-alert is released under the BSD-3-Clause License. See the bundled LICENSE.md for details., (*12)

The Versions

07/02 2018

dev-master

9999999-dev https://github.com/kartik-v/yii2-widget-alert

A widget to generate alert based notifications using bootstrap-alert plugin (sub repo split from yii2-widgets)

  Sources   Download

BSD-3-Clause BSD 3-Clause

The Requires

 

plugin extension yii2 jquery bootstrap widget block notification alert flash

10/03 2017

v1.1.1

1.1.1.0 https://github.com/kartik-v/yii2-widget-alert

A widget to generate alert based notifications using bootstrap-alert plugin (sub repo split from yii2-widgets)

  Sources   Download

BSD 3-Clause

The Requires

 

plugin extension yii2 jquery bootstrap widget block notification alert flash

19/11 2014

1.1.0.x-dev

1.1.0.9999999-dev https://github.com/kartik-v/yii2-widget-alert

A widget to generate alert based notifications using bootstrap-alert plugin (sub repo split from yii2-widgets)

  Sources   Download

BSD 3-Clause

The Requires

 

plugin extension yii2 jquery bootstrap widget block notification alert flash

19/11 2014

v1.1.0

1.1.0.0 https://github.com/kartik-v/yii2-widget-alert

A widget to generate alert based notifications using bootstrap-alert plugin (sub repo split from yii2-widgets)

  Sources   Download

BSD 3-Clause

The Requires

 

plugin extension yii2 jquery bootstrap widget block notification alert flash

09/11 2014

1.0.0.x-dev

1.0.0.9999999-dev https://github.com/kartik-v/yii2-widget-alert

A widget to generate alert based notifications using bootstrap-alert plugin (sub repo split from yii2-widgets)

  Sources   Download

BSD 3-Clause

The Requires

 

plugin extension yii2 jquery bootstrap widget block notification alert flash

09/11 2014

v1.0.0

1.0.0.0 https://github.com/kartik-v/yii2-widget-alert

A widget to generate alert based notifications using bootstrap-alert plugin (sub repo split from yii2-widgets)

  Sources   Download

BSD 3-Clause

The Requires

 

plugin extension yii2 jquery bootstrap widget block notification alert flash