awema-pl/module-system-notify
Composer 安装命令:
composer require awema-pl/module-system-notify
包简介
Module for display notifications in theme.
关键字:
README 文档
README
This is where your description should go. Take a look at contributing.md to see a to do list.
Documentation
NPM scripts
Development mode npm run watch or simply npm start
Development mode for IE npm run watch:legacy
Production build npm run build
Installation
Via Composer
$ composer require awema-pl/module-system-notify
The package will automatically register itself.
Usage
Create a container to display notifications in:
@notify(['name' => 'container', 'stack' => false, 'config' => "{theme: 'inline', timeout: 0}"])
More info about custom containers
// notify in different styles to specific container Notify::info('title', 'message')->to('container'); Notify::error('title', 'message')->to('container'); Notify::warning('title', 'message')->to('container'); Notify::success('title', 'message')->to('container'); // add button to notification Notify::notify('title', 'message', 'success') ->withButton([ 'text' => 'Install now', // button cta text, required 'url' => '/path', // required 'data' => [ 'param' => 'some param' ], // payload, if needed 'method' => 'patch'// if needed, POST by default ])->to('container');
More info about notification options
Helper function also available:
alert('title', 'message', 'info')->to('container');
Messages allowed to include basic HTML:
alert('title', '<a href="/path">message</a>', 'info')->to('container');
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email :author_email instead of using the issue tracker.
Credits
License
GNU General Public License v3.0. Please see the license file for more information.
统计信息
- 总下载量: 64
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 14
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-10-12