, (*1)
Provides a lot of Twig Extensions., (*2)
(php, image, link, css, js, tag, session, number, sf, unset, form, html, ...), (*3)
Requirement
- Twig version 1.5 or later
- Symfony version 2.0.9 or later
Installation
1- Add the following lines in your deps file:, (*4)
[LidaaTwigBundle]
git=git://github.com/lidaa/LidaaTwigBundle.git
target=/bundles/Lidaa/TwigBundle
2- Now, run the vendors script to download the bundle:, (*5)
$ php bin/vendors install
3- Add LidaaTwigBundle to your application kernel:, (*6)
// app/AppKernel.php
public function registerBundles()
{
return array(
// ...
new Lidaa\TwigBundle\LidaaTwigBundle(),
// ...
);
}
4- Add the 'Lidaa' namespace to your autoloader:, (*7)
// app/autoload.php
$loader->registerNamespaces(array(
//...
'Lidaa' => __DIR__.'/../vendor/bundles',
//...
));
Extensions:
-
PhpExtension (see documentation : /Resources/doc/php), (*8)
-
ImageExtension (see documentation : /Resources/doc/image), (*9)
-
LinkExtension (see documentation : /Resources/doc/url), (*10)
-
CssExtension (see documentation : /Resources/doc/css), (*11)
-
JsExtension (see documentation : /Resources/doc/js), (*12)
-
TagExtension (see documentation : /Resources/doc/tag), (*13)
-
SessionExtension (see documentation : /Resources/doc/session), (*14)
-
NumberExtension (see documentation : /Resources/doc/number), (*15)
-
SfExtension (see documentation : /Resources/doc/sf), (*16)
-
UnsetExtension (see documentation : /Resources/doc/unset), (*17)
-
FormExtension (see documentation : /Resources/doc/form), (*18)
-
HtmlExtension (see documentation : /Resources/doc/html), (*19)
-
TextExtension (see documentation : /Resources/doc/text), (*20)
TODO:
- Add DateExtension
- Add ajax and highligh to JsExtension