Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

efureev/yii2-noty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Sep 15, 2016
355c4a9 · Sep 15, 2016

History

31 Commits
Sep 15, 2016
Sep 12, 2016
Sep 8, 2016
Sep 8, 2016
Sep 8, 2016
Sep 15, 2016
Sep 8, 2016
Sep 12, 2016
Sep 15, 2016
Sep 8, 2016

Repository files navigation

yii2-noty

GitHub version Build Status Dependency Status Code Climate Test Coverage

Wrapper for https://github.com/efureev/noty


Install

Either run

composer require "efureev/yii2-noty: *"

or add

"efureev/yii2-noty": "~1",

to the require section of your composer.json file.


Methods

  • alert - show the alert window
// @var string|object
app.msg.alert('Alarma!...');
  • info - show the info window
// @var string|object
app.msg.info('Alarma!...');
  • error - show the error window
// @var string|object
app.msg.error('Alarma!...');
  • success - show the success window
// @var string|object
app.msg.success('Alarma!...');
  • warning - show the warning window
// @var string|object
app.msg.warning('Alarma!...');
  • confirm - show the warning window
// @var string|object
app.msg.confirm('Alarma!...');
//@var function onOkFn : function on click Ok
//@var function onCancelFn : function on click Cancel
//@var object callbacks : callbacks from noty
app.msg.confirm('Alarma!...',onOkFn, onCancelFn, callbacks);

(callbacks)[http://ned.im/noty/#/about]


Run

Example 1

\efureev\noty\NotyWidget::widget();
app.msg.error('Alarma!');
app.msg.success('You are winner!');
app.msg.success('You are winner!');

Example 2: set Flashes

app()->session->setFlash('warning', 'Warning.');
app()->session->setFlash('error', 'Error.');
app()->session->setFlash('info', 'Joke.');

Tests

vendor/bin/phpunit

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published