承接 mouf/html.widgets.messageservice 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mouf/html.widgets.messageservice

最新稳定版本:v4.0.0

Composer 安装命令:

composer require mouf/html.widgets.messageservice

包简介

Use this package to display info/warning/error messages to the user on a web page. Using the SessionMessageService class, you register messages to be displayed. Using the MessageWidget class, you display the error messages in your templates.

README 文档

README

This service allows to implement user oriented messaging. It relies on a simple function that will add a message with a given level, and an HTML block that will render user's messages when the page is loaded.

Example

Using the Service

When the package is installed, a block is added to the template's content. When rendered, this block will dump the messages that were stored into the session.

Add a message :

$messageService->setMessage("User <b>foo bar</b> has been successfully cerated", UserMessageInterface::SUCCESS);

The UserMessageInterface defines 4 types of message :

  • SUCCESS
  • INFO
  • WARNING
  • ERROR

By default, the message will be displayed in the header block. But you are free to insert this block anywhere.

More Information can be found here :

统计信息

  • 总下载量: 239.78k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-11-27