terabytesoftw/widget-alert

Widget Alert with Bootstrap4

dev-master / 1.0.x-dev 2019-06-25 13:48 UTC

This package is auto-updated.

Last update: 2023-09-16 01:30:57 UTC


README

68747470733a2f2f6c68332e676f6f676c6575736572636f6e74656e742e636f6d2f443954467731463664645075686544635f74704e707454647654672d464e4e706a4c53424e3134583653632d334a44694f7866453637724568344f5a6679676f6e7831744b656932623244454f48444c6a46365433786c38652d726b4545505a6547714c545763535f76326342526c796f3076635a4c44484735697653444749574373656e626f6c3d7732343030

Widget Alert with Bootstrap 4

Unstable Version Build Status Build Status Build Status Code Quality Code Intelligence Status Maintainability


DIRECTORY STRUCTURE:

config/             contains widget configurations
src/                contains source widget file
tests/              contains test codeception

REQUIREMENTS:

The minimum requirement by this extension that your Web server supports PHP 7.2.

INSTALATION:

If you do not have Composer, you may install it by following the instructions at getcomposer.org.

You can then install this project template using the following command:

Linux:
php composer.phar require --prefer-dist terabytesoftw/alert "^1.0-dev"
Windows:
composer require --prefer-dist terabytesoftw/alert "^1.0-dev"

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:.

Flash Messages:

68747470733a2f2f6c68332e676f6f676c6575736572636f6e74656e742e636f6d2f53734a583450705f4f734d526769456243532d69464651395f62656834545548667444656b75574e39495a61396c31664f7a514c566656322d636d73505a714d4e30356377344b675432763648345531766e6a585f35444c6b6750696a593367456c6f74485f714e47454e48375a574e766e53774a7246757946696132484b7a484d724e4638456767413d7732343030

Controllers:

$this->module->session->setFlash('primary', 'A simple primary alert—check it out!');

Views:

$this->context->module->session->setFlash('primary', 'A simple primary alert—check it out!');
Controllers:

$this->module->session->setFlash('danger', 'This is the message');
$this->module->session->setFlash('success', 'This is the message');
$this->module->session->setFlash('info', 'This is the message');
$this->module->session->setFlash('light', 'This is the message');
$this->module->session->setFlash('primary', 'This is the message');
$this->module->session->setFlash('secondary', 'This is the message');
$this->module->session->setFlash('success', 'This is the message');
$this->module->session->setFlash('warning', 'This is the message');

Views:

$this->context->module->session->setFlash('danger', 'This is the message');
$this->context->module->session->setFlash('success', 'This is the message');
$this->context->module->session->setFlash('info', 'This is the message');
$this->context->module->session->setFlash('light', 'This is the message');
$this->context->module->session->setFlash('primary', 'This is the message');
$this->context->module->session->setFlash('secondary', 'This is the message');
$this->context->module->session->setFlash('success', 'This is the message');
$this->context->module->session->setFlash('warning', 'This is the message');

Multiple messages could be set as follows:

Controllers:

$this->module->session->setFlash('error', ['Error 1', 'Error 2']);

Views:

$this->context->module->session->setFlash('error', ['Error 1', 'Error 2']);

Usages Layouts\View:

use terabytesoft\widgets\Alert;

<?= Alert::widget() ?>

RUN TESTS CODECEPTION:

// download all composer dependencies root project
$ composer update --prefer-dist -vvv

// run all tests with code coverage
$ vendor/bin/codecept run unit --coverage-xml

WEB SERVER SUPPORT:

  • Apache.
  • Nginx.
  • OpenLiteSpeed.

DOCUMENTATION STYLE GUIDE:

Style CI Documentation PSR2.

LICENSE:

License YiiFramework Total Downloads StyleCI