ernb14/cflash 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ernb14/cflash

Composer 安装命令:

composer require ernb14/cflash

包简介

Flash message class for Anax-MVC

README 文档

README

With CFlash you can customize your own flash messages easy. With five pre defined flash message types it is very easy to install. You can also create your own personal ones.

License

This software is free software and carries a MIT license.

Installation

To install with Composer and Packagist:
"ernb14/cflash": "dev-master"

How to use flash messages

Firs you need to add this shared service in to your page controller.

$di->setShared('flash', function() use ($di) { $flashmessage = new \CFlash\CFlash\CFlash(); $flashmessage->setDI($di); return $flashmessage; });

Then you need to copy the images and css file in to your img and css paths. So you need to go to your theme root path like this:
cd your-theme
cp vendor/ernb14/CFlash/src/CFlash/css/CFlash.css webroot/css
cp -r vendor/ernb14/CFlash/src/CFlash/img/flash webroot/img

Now you only have to put this out in a route: Example message $app->flash->CustomMessage('Godkänt', 'success'); and to display the message use $messages = $app->flash->displayFlashMessages(); and $app->views->addString($messages); to retrive the messages.

Pre defined messages

This class includes five pre defined messages. And those are 'error', 'success', 'info', 'warning', 'notice'. Here is and example of how you can use one: $app->flash->CustomMessage('Felmeddelenade', 'error');

To create a new message you can do this $app->flash->CustomMessage('Your message', 'message type'); which the type defines the css class that you can modify.

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固