mazarini/message-bundle
最新稳定版本:v1.0.0
Composer 安装命令:
composer require mazarini/message-bundle
包简介
Display alerts on webpage.
README 文档
README
Display alerts on webpage for symfony using alert from bootstrap.
Installation
foo@bar:~$ composer require mazarini/message-bundle
Add alerts with twig
In template/base.html.twig :
{% include('@MazariniMessage/_messages.html.twig') %}
Display alerts in create order
In each controller :
<?php ... use Mazarini\MessageBundle\Controller\MessageControllerTrait; ... class HomeController extends AbstractController { use MessageControllerTrait; ... }
Default configuration
foo@bar:~$ symfony console debug:config MazariniMessageBundle Current configuration for "MazariniMessageBundle" ================================================= mazarini_message: default: alert-danger types: primary: alert-primary secondary: alert-secondary success: alert-success danger: alert-danger error: alert-danger warning: alert-warning info: alert-info light: alert-light dark: alert-dark foo@bar:~$
"types" is use to translate type of messages to class of alerts. By default, bootstrap classes are defines but other can be use.
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2024-01-15