定制 coderspotting/toast-message 二次开发

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

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

coderspotting/toast-message

最新稳定版本:1.2

Composer 安装命令:

composer require coderspotting/toast-message

包简介

Easy integration of AlertifyJS.com in Symfony

README 文档

README

A Symfony Bundle to integrate alertify.js (https://alertifyjs.org/) into your project.

Installation

composer require coderspotting\toast-message

Configuration

The bundle comes with an integrated version of Alertify.js. You can include that version by adding the following snippet to your Twig template. Optionally you can leave this out and include your own version of Alertify.js.

{% stylesheets filter='cssrewrite' 'bundles/coderspottingtoastmessage/css/*' %}
<link href="{{ asset_url }}" type="text/css" rel="stylesheet" media="screen" />
{% endstylesheets %}

Similarly the snippet below will load the included version of Alertify.js in your Twig template. Optionally you can replace this with your own version of Alertify.js.

{% javascripts '@CoderSpottingToastMessageBundle/Resources/public/js/*' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}

Regardless if you included the builtin version or your own version of Alertify.js you have to include the following in your Twig template, after the inclusion of the Javascript.

{{ renderToasts() }}

Usage

Retrieve the service and add a toast message as shown below. You can add multiple toast messages. The next rendering of a Twig template will include the toast messages and show them in the browser.

$toastService = $this->container->get('CoderSpotting.ToastMessage');

$toastService->addToast("This is a toast message");

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固