2017 © Pedro Peláez
 

symfony-bundle toast-message

Easy integration of AlertifyJS.com in Symfony

image

coderspotting/toast-message

Easy integration of AlertifyJS.com in Symfony

  • Friday, July 28, 2017
  • by bderidder
  • Repository
  • 1 Watchers
  • 0 Stars
  • 136 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

Coderspotting toast-message

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

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., (*2)

{% 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., (*3)

{% 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., (*4)

{{ 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., (*5)

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

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

The Versions

28/07 2017

dev-master

9999999-dev

Easy integration of AlertifyJS.com in Symfony

  Sources   Download

MIT

The Requires

 

by Bavo De Ridder

form extra form alertify

28/07 2017

1.2

1.2.0.0

Easy integration of AlertifyJS.com in Symfony

  Sources   Download

MIT

The Requires

 

by Bavo De Ridder

form extra form alertify

24/12 2016

1.1

1.1.0.0

Easy integration of AlertifyJS.com in Symfony

  Sources   Download

MIT

The Requires

 

by Bavo De Ridder

form extra form alertify

05/04 2016

1.0

1.0.0.0

Easy integration of alertify.js in Symfony

  Sources   Download

MIT

The Requires

 

by Bavo De Ridder

form extra form alertify