efureev/yii2-noty

This package is abandoned and no longer maintained. No replacement package was suggested.

A Yii2 wrapper widget for the Noty, a noty plugin with jQuery.

Installs: 30

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

0.1.3 2016-09-15 17:00 UTC

This package is auto-updated.

Last update: 2024-04-29 03:10:17 UTC


README

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