2017 © Pedro Peláez
 

symfony-bundle flash-bundle

Makes adding & translating flash messages in Symfony simple.

image

xm/flash-bundle

Makes adding & translating flash messages in Symfony simple.

  • Tuesday, July 18, 2017
  • by darrylhein
  • Repository
  • 2 Watchers
  • 0 Stars
  • 107 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 32 % Grown

The README.md

XMFlashBundle

Makes adding & translating flash messages in Symfony simple., (*1)

Installation

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*2)

$ php composer.phar require xm/flash-bundle

This command requires Composer., (*3)

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:, (*4)

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new XM\FlashBundle\XMFlashBundle(),
        );

        // ...
    }
}

Step 3: Add Service Alias

Adding the following will make the call to the service shorter:, (*5)

flash_handler: '@xm_flash.handler'

Usage

The handler will always pull messages from the default translation file, typically messages., (*6)

Just a message, no translation:

$this->get('flash_handler')->add('success', 'The record was saved.');

With translation message key and parameters:

$this->get('flash_handler')->add('success', 'app.message.entity_updated', ['%name%' => 'User']);

The Versions

18/07 2017

dev-master

9999999-dev https://github.com/xmmedia/XMFlashBundle

Makes adding & translating flash messages in Symfony simple.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Darryl Hein

18/07 2017

1.1.1

1.1.1.0 https://github.com/xmmedia/XMFlashBundle

Makes adding & translating flash messages in Symfony simple.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Darryl Hein

18/07 2017

1.0.0

1.0.0.0 https://github.com/xmmedia/XMFlashBundle

Makes adding & translating flash messages in Symfony simple.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Darryl Hein

18/07 2017

1.1.0

1.1.0.0 https://github.com/xmmedia/XMFlashBundle

Makes adding & translating flash messages in Symfony simple.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Darryl Hein

06/07 2017

1.1

1.1.0.0 https://github.com/xmmedia/XMFlashBundle

Makes adding & translating flash messages in Symfony simple.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Darryl Hein

04/07 2017

1.0

1.0.0.0 https://github.com/xmmedia/XMFlashBundle

Makes adding & translating flash messages in Symfony simple.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Darryl Hein