yii-extension / flash-message-bulma
Flash message service
Installs: 2 017
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^7.4|^8.0
- composer-runtime-api: ^2.0
- yiisoft/session: ^1.0
Requires (Dev)
- httpsoft/http-message: ^1.0.5
- vimeo/psalm: ^4.3
This package is auto-updated.
Last update: 2021-07-27 17:18:39 UTC
README
Flash message service
Installation
composer require yii-extension/flash-message-service
Usages:
Automatically detects if you use yii-extension/flash-message-bulma
or yii-extension/alert-message-bootstrap5
, and format the messages according to the widget.
You can inject flash-message-service into the controller or action, and automatically all dependencies are resolved by autowired in di-container.
<?php declare(strict_types=1); namespace App\Action; use Psr\Http\Message\ResponseInterface; use Yii\Extension\Service\ServiceFlashMessage; final class Example { public function run(ServiceFlashMessage $serviceFlashMessage): ResponseInterface { $serviceFlashMessage->run('success', 'Header message', 'Body message'); } }
Static analysis
The code is statically analyzed with Psalm. To run static analysis:
./vendor/bin/psalm
License
The Flash message service 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.