定制 ajt/flashbundle 二次开发

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

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

ajt/flashbundle

Composer 安装命令:

composer require ajt/flashbundle

包简介

Symfony bundle for for managing flash messages

README 文档

README

Build Status SensioLabsInsight

The AJT Flash Bundle will manage the use of Symfony flash messages with a simple API.

Usage

Inject the Flash service into any service

<argument type="service" id="ajt.flash" />

Use it in service

class MyClass
{

    private $flash;

    public function __construct(FlashInterface $flash)
    {
        $this->flash = $flash;
    }

    public function goThings()
    {
        ...
        $this->flash->success("Well done");
    }
}

Use the twig function in your template,

{{ ajt_flash() }}

Or if you want to only display some types of message

{{ ajt_flash('error') }}

Standard Types

By default the Flash bundle will support the standard bootstrap alert types.

// Set a custom type

$flash->set('my message', 'myType');

// Bootstrap
$flash->success('my message');
$flash->error('my message');
$flash->info('my message');
$flash->warning('my message');

Custom Css

Custom css classes can be set by modifying config.

ajt_flash:
	default_class: alert # Added to every flash
	
	# CSS to add to the standard flash types - default to bootstrap
	core:
		success: alert-success
		error: alert-danger
		info: alert-info
		warning: alert-warning
	
	# Add a custom flash type called myType with the css myCss
	custom:
		myType:
			type: myType
			css: myCss

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-03-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固