2017 © Pedro Peláez
 

yii2-extension yii2-toastr

Yii2 widget for jquery toastr notifications

image

alikdex/yii2-toastr

Yii2 widget for jquery toastr notifications

  • Wednesday, August 24, 2016
  • by AlikDex
  • Repository
  • 0 Watchers
  • 0 Stars
  • 20 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 11 % Grown

The README.md

yii2-toastr

Toastr notifications widget for yii2

This is the Toastr extension for Yii 2. It encapsulates Toastr plugin in terms of Yii widgets., (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist alikdex/yii2-toastr "*"

or add, (*4)

"alikdex/yii2-toastr": "*"

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

Usage

Once the extension is installed, you can test that the extension works by simply use it in your code by :, (*6)

<?= \alikdex\toastr\Toastr::widget([
    'toastType' => 'error',
    'message' => 'This is an error.',
]);?>

There are 2 main useful widgets, (*7)

ToastrAlert

displays Yii flash messages in toastr notification style, (*8)

<?php
$session = \Yii::$app->getSession();
$session->setFlash('error', "msg1");
$session->setFlash('danger', "msg2");
$session->setFlash('warning', "msg3");
$session->setFlash('info', "msg4");
$session->setFlash('success', "msg5");
?>
<?= \alikdex\toastr\ToastrAlert::widget([
    'options' => [
        'positionClass' => 'toast-bottom-left'
    ]
]);?>

The Versions

24/08 2016

dev-master

9999999-dev

Yii2 widget for jquery toastr notifications

  Sources   Download

MIT License

The Requires

 

by Alik Dexor

extension yii2 jquery notifications toastr

24/08 2016

1.0

1.0.0.0

Yii2 widget for jquery toastr notifications

  Sources   Download

MIT License

The Requires

 

by Alik Dexor

extension yii2 jquery notifications toastr