mapado/twig-extensions-bundle

Provides some Twig extensions for your project.

Installs: 20 192

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 13

Forks: 1

Open Issues: 0

Type:symfony-bundle

v1.0.0 2014-09-18 06:40 UTC

This package is auto-updated.

Last update: 2024-10-15 10:08:27 UTC


README

MapadoTwigExtensionsBundle is just a collection of useful Twig extensions.

This bundle should be used in conjunction with Symfony2.

ParseUrl Filter

Provides an parse_url filter, to parse an url.

A call to parse_url is made.

{{ someUrl | parse_url('host') }}

Will return the host of someUrl (or false if not found).

Installation

Get the bundle

Add this in your composer.json

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

and then run

php composer.phar update

or

composer update

if you installed composer globally.

Enable the bundle

// in app/AppKernel.php
public function registerBundles() {
	$bundles = array(
		// ...
		new Mapado\TwigExtensionsBundle\MapadoTwigExtensionsBundle(),
	);
	// ...
}