friendsofsilverstripe/backendmessages
Composer 安装命令:
composer require friendsofsilverstripe/backendmessages
包简介
DRY way to create message boxes in SilverStripe backend.
README 文档
README
Requirements
- SilverStripe Framework ^3.0 or ^4.0
Installation
composer require friendsofsilverstripe/backendmessages
Usage
Within any FieldList you can call any of the following static methods to create a message box:
use FriendsOfSilverStripe\Backendmessages\ErrorMessage;
use FriendsOfSilverStripe\Backendmessages\WarningMessage;
use FriendsOfSilverStripe\Backendmessages\SuccessMessage;
use FriendsOfSilverStripe\Backendmessages\NoticeMessage;
use FriendsOfSilverStripe\Backendmessages\Message;
// [...]
FieldList::create(
ErrorMessage::create('Ehh, something went wrong.'),
WarningMessage::create('Be careful with this!'),
SuccessMessage::create('Yeah, that went through just fine.'),
NoticeMessage::create('This is a useful hint.'),
Message::generic('Some more information.')
);
generates
Allow HTML in the backend messages
Add the following to your config.yml
FriendsOfSilverStripe\Backendmessages\MessageBoxField:
allow_html: true
MISC: Future ideas/development, issues, Contributing, License
This project is supported by bring your own ideas Ltd.. Bring Your Own Ideas Ltd. helps you to make your project ideas a reality.
统计信息
- 总下载量: 15.87k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-10-27
