2017 © Pedro Peláez
 

yii2-extension yii2-bootstrap-notify

Alert widget based on Bootstrap Notify extension {@link http://bootstrap-notify.remabledesigns.com/)

image

yii2mod/yii2-bootstrap-notify

Alert widget based on Bootstrap Notify extension {@link http://bootstrap-notify.remabledesigns.com/)

  • Saturday, August 26, 2017
  • by disem
  • Repository
  • 3 Watchers
  • 12 Stars
  • 5,389 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 35 % Grown

The README.md

, (*1)

Yii2 Notify Widget


Notify widget based on Bootstrap Notify, (*2)

Latest Stable Version Total Downloads License, (*3)

Installation

The preferred way to install this extension is through composer., (*4)

Either run, (*5)

php composer.phar require --prefer-dist yii2mod/yii2-bootstrap-notify "*"

or add, (*6)

"yii2mod/yii2-bootstrap-notify": "*"

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

Usage

Alert widget renders a message from session flash. All flash messages are displayed in the sequence they were assigned using setFlash. You can set message as following:, (*8)

1) Set the message in your action, for example:, (*9)

Yii::$app->session->setFlash('success', 'This is the message');
Yii::$app->session->setFlash('info', 'Your message');
Yii::$app->session->setFlash('warning', 'Your message');
Yii::$app->session->setFlash('error', 'Your message');

Also, you can set multiple messages as follows:, (*10)

Yii::$app->session->setFlash('error', ['Error 1', 'Error 2']);

2) Simply add widget to your layout as follows:, (*11)

<?php echo \yii2mod\notify\BootstrapNotify::widget(); ?>

You can render your own message without the session flash as following:, (*12)

<?php echo \yii2mod\notify\BootstrapNotify::widget([
    'useSessionFlash' => false,
    'options' => [
        'message' => 'Your message',
    ],
    'clientOptions' => [
        'type' => \yii2mod\notify\BootstrapNotify::TYPE_SUCCESS,
        'showProgressbar' => true
    ]
]); ?>

Alert Options

You can find them on the options page, (*13)

Support us

Does your business depend on our contributions? Reach out and support us on Patreon. All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff., (*14)

The Versions

26/08 2017

dev-master

9999999-dev

Alert widget based on Bootstrap Notify extension {@link http://bootstrap-notify.remabledesigns.com/)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Igor Chepurnoy
by Igor Chepurnoi

yii2 yii2 alert yii2 bootstrap alert

06/03 2017

1.2

1.2.0.0

Alert widget based on Bootstrap Notify extension {@link http://bootstrap-notify.remabledesigns.com/)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Igor Chepurnoy

yii2 yii2 alert yii2 bootstrap alert

29/08 2016

1.1

1.1.0.0

Alert widget based on Bootstrap Notify extension {@link http://bootstrap-notify.remabledesigns.com/)

  Sources   Download

MIT

The Requires

 

by Igor Chepurnoy

yii2 yii2 alert yii2 bootstrap alert

29/08 2016

1.0

1.0.0.0

Alert widget based on Bootstrap Notify extension {@link http://bootstrap-notify.remabledesigns.com/)

  Sources   Download

MIT

The Requires

 

by Igor Chepurnoy

yii2 yii2 alert yii2 bootstrap alert