Download the PHP package ras/flash-alert-bundle without Composer

On this page you can find all versions of the php package ras/flash-alert-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package flash-alert-bundle

FlashAlertBundle

Join the chat at https://gitter.im/rasanga/FlashAlertBundle FlashAlertBundle is an open source Bundle which simplifies displaying flash alerts such as success, error, info and warning

Build Status Scrutinizer Code Quality

Demo screenshot

Table of Contents

  1. Installation
    1. Download the FlashAlertBundle
    2. Enable the bundle
    3. Configure the bundle
  2. Usage
    1. Report flash alerts
    2. Display flash alerts
  3. Configuration
    1. Override view template
    2. Add custom styles
  4. Changelog
  5. License

Installation

Step 1: Download the FlashAlertBundle

Using Composer Add the following to the "require" section of your composer.json file:

And update your dependencies

Using submodules Execute the following command on your project root:

Step 2: Enable the bundle

Registers the bundle in your app/AppKernel.php:

Step Optional, if you are not using composer: Configure the Autoloader

Add the following to your autoload.php:

Usage

Report flash alerts

Add the following PHP code to report an alert message:

Note: You can choose one of the following functions to call from $this->get('ras_flash_alert.alert_reporter')

Display flash alerts

Add the following twig code where you want to display alert messages:

Note 1: The parent twig template would be the best place for displaying flash alerts

Configuration

The following parameters can be overriden in your config.yml or similar:

These can also be passed as parameters in the view when rendering alerts - for example:

Override view template

  1. Create template in the /Resources/views/ or in your bundle
  2. Retrieve alerts into your template with {{ get_alert_publisher() }}
  3. Include template blocks in FlashAlertBundle/Resources/views/FlashAlert directory or define your own blocks (follow FlashAlertBundle/Resources/views/FlashAlert/flashAlerts.html.twig to see how you can define your own template)

Add custom styles

The bundle default template has styles defined by default. However, you can turn off default styles by configuring isAddStyles variable to false as shown in below.

Then you can define your own styles to match alert classes such as alert, alert-close, alert-success, alert-error, alert-warning and alert-info

CHANGELOG

2.0

Add twig method for rendering alerts: `{{ render_flash_alerts() }}`
Add twig method for retrieving alerts: `{{ get_alert_publisher() }}`
Deprecated controller view render 

LICENSE

FlashAlertBundle is licensed under the MIT Open Source license.

Bitdeli Badge


All versions of flash-alert-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
symfony/symfony Version >=2.1
twig/twig Version ~1.12
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ras/flash-alert-bundle contains the following files

Loading the files please wait ....