nmb/twig-extensions-bundle

Add some functions and filters to twig

1.0.0 2013-08-05 20:53 UTC

README

Some Twig functions and filters i wanna use on my symfony projects

Installation

Add NmbTwigExtensionsBundle to your composer.json

{
    "require": {
        "nmb/twig-extensions-bundle": "dev-master"
    }
}

Download the bundle by runung the command

$php composer.phar update nmb/twig-extensions-bundle

Add the bundle to your app/AppKernel.php

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Nmb\TwigExtensionsBundle\NmbTwigExtensionsBundle(),
    );
}

Usage

In your twig template

{{ getParameter('my_parameter') }}