定制 helikopterspark/flashmsg 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

helikopterspark/flashmsg

Composer 安装命令:

composer require helikopterspark/flashmsg

包简介

Message controller for ANAX-MVC

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage

FlashMessage

This is a module for the Anax-MVC web framework. The module has been developed as a part of a course on Blekinge Tekniska Högskola.

Flash messages are used to display status messages, results of actions or notices. Use this component to generate these types of messages.

The class FlashMsg uses the session service in Anax-MVC to store the messages until the array is cleared.

#Installation

  1. To install, use composer.
  2. Add this line into your composer.json file:
"require": {"helikopterspark/flashmsg": "dev-master"}
  1. Move or copy the css/flashmsg.css file to the webroot/css folder in your Anax-MVC installation. Modify it to your liking.
  2. In the router you also need to add the css-stylesheet flashmsg.css.
  3. You can move or copy the file flashmessages.php to your webroot to test in a web browser.

#Access the controller in your frontcontroller:

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

#Add the route in your frontcontroller:

$app->router->add('', function() use ($app) {
	$app->theme->addStylesheet('css/flashmsg.css');
	$app->theme->setTitle("Flash messages");

	$app->flashmessage->alert('Alert');
	$app->flashmessage->error('Error');
	$app->flashmessage->info('Info');
	$app->flashmessage->notice('Notice');
	$app->flashmessage->success('Success');
	$app->flashmessage->warning('Warning');

	$app->views->add('theme/index', ['content' => $app->flashmessage->outputMsgs()]);

	$app->flashmessage->clearMessages();

});

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固