yii-extension / alert-flash-bulma
Alert Flash Bulma Widget.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 1 489
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 5
Requires
- php: ^7.4|^8.0
- yii-extension/asset-bulma: ^1.0.0
- yii-extension/widgets: ^1.0.0
- yiisoft/session: ^1.0
Requires (Dev)
- nyholm/psr7: ^1.4.0
- phpunit/phpunit: ^9.5
- roave/infection-static-analysis-plugin: ^1.8
- vimeo/psalm: ^4.8
- yiisoft/var-dumper: ^1.1.0
This package is auto-updated.
Last update: 2024-01-10 13:38:53 UTC
README
Alert Flash Bulma Widget
Installation
composer require yii-extension/alert-flash-bulma
Usage
In controller or action:
<?php declare(strict_types=1); namespace App\Action; use Psr\Http\Message\ResponseInterface; use Yiisoft\Session\Flash\Flash; final class Action { public function index(Flash $flash): ResponseInterface { $flash->add( 'success', // types: [danger, dark, info, link, primary, success, warning] [ 'header' => 'Header message flash', // Its optional. 'body' => 'body message flash' // Its mandatory. ], true ); } }
In layout:
<?php declare(strict_types=1); use Yii\Extension\Widget\FlashMessage; ?> <?= FlashMessage::widget() ?>
Unit testing
The package is tested with PHPUnit. To run tests:
./vendor/bin/phpunit
Mutation testing
The package tests are checked with Infection mutation framework. To run it:
./vendor/bin/infection
Static analysis
The code is statically analyzed with Psalm. To run static analysis:
./vendor/bin/psalm
License
The yii-extension/alert-flash-bulma
for Yii Packages is free software.
It is released under the terms of the BSD License. Please see LICENSE
for more information.
Maintained by Yii Extension.