2017 © Pedro Peláez
 

symfony-bundle twig-extensions-bundle

Some useful twig extensions

image

sk/twig-extensions-bundle

Some useful twig extensions

  • Thursday, June 21, 2018
  • by skroczek
  • Repository
  • 1 Watchers
  • 0 Stars
  • 48 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 23 % Grown

The README.md

SKTwigExtensionsBundle

Build Status SensioLabsInsight Coverage Status, (*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)

$ composer require sk/twig-extensions-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation., (*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 SK\TwigExtensionsBundle\SKTwigExtensionsBundle(),
        );

        // ...
    }

    // ...
}

Step 3: Activate the extensions you want

By default all extensions are disabled. But you can easily activate the extensions you want:, (*5)

sk_twig_extensions:
    extensions:
        format_extension: true
        routing_extra_extension: true
        util_extension: true
        string_extension: true

What you will get

You will get a short set of useful and handy twig functions and filter. For more information and examples follow the links., (*6)

Included Extensions

License

This bundle is under the MIT license. See the complete license in the bundles LICENSE file., (*7)

The Versions

15/11 2016
10/11 2016
09/11 2016