2017 © Pedro Peláez
 

yii2-extension yii2-sweet-alert

Alert widget based on SweetAlert extension {@link http://tristanedwards.me/sweetalert)

image

marqu3s/yii2-sweet-alert

Alert widget based on SweetAlert extension {@link http://tristanedwards.me/sweetalert)

  • Monday, September 18, 2017
  • by marqu3s
  • Repository
  • 2 Watchers
  • 2 Stars
  • 86 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 15 Forks
  • 0 Open issues
  • 1 Versions
  • 18 % Grown

The README.md

Alert Widget for Yii 2

  • Alert widget based on SweetAlert extension http://tristanedwards.me/sweetalert
  • Forked from yii2mod/yii2-sweet-alert and adapted to suit my needs.

Installation

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

Either run, (*2)

php composer.phar require --prefer-dist marqu3s/yii2-sweet-alert "*"

or add, (*3)

"marqu3s/yii2-sweet-alert": "*"

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

Usage

Once the extension is installed, simply add widget to your page as follows:, (*5)

1) Default usage, render all flash messages stored in session flash via Yii::$app->session->setFlash()., (*6)

echo Alert::widget(); 

2) Custom usage example:, (*7)

echo Alert::widget([
          'useSessionFlash' => false,
          'options' => [
               'title' => 'Success message',
               'type' => 'Success',
               'text' => "You will not be able to recover this imaginary file!",
               'confirmButtonText'  => "Yes, delete it!",   
               'cancelButtonText' =>  "No, cancel plx!"
          ]
]);

Alert Options

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

The Versions

18/09 2017

dev-master

9999999-dev https://github.com/marqu3s/yii2-sweet-alert

Alert widget based on SweetAlert extension {@link http://tristanedwards.me/sweetalert)

  Sources   Download

Apache-2.0

The Requires

 

by Igor Chepurnoy
by Joao Marques

yii2 module