Twital integration for Symfony2
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
src/Goetas/TwitalBundle
tests
.gitignore
.scrutinizer.yml
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
composer.json
phpunit.xml.dist

README.md

Build Status Scrutinizer Quality Score Code Coverage GitHub license Packagist

TwitalBundle (Twital with Symfony2)

TwitalBundle is a Symfony2 bundle that integrates the Twital template engine into Synfony2 framework. This enables you to use all Twig/Symfony2 functionalities with the Twital template engine language syntax.

To learn more about Twital, you can read the dedicated documentation.

Install

The recommended way to install TwitalBundle is using Composer:

composer require 'goetas/twital-bundle'

Enable the bundle

To enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Goetas\TwitalBundle\GoetasTwitalBundle(),
        //..
    );
}

Configure

In order to make it work, you have to enable the twital template engine inside your config.yml.

framework:
    templating:
        engines: ['twig', 'twital']

#optional configurations for file extension matching 
goetas_twital:
    source_adapter:
        - { service: twital.source_adapter.xml, pattern: ['/\.xml\.twital$/', '/\.atom\.twital$/'] }
        - { service: twital.source_adapter.html, pattern: ['/\.html\.twital$/', '/\.htm\.twital$/'] }
        - { service: twital.source_adapter.xhtml, pattern: ['/\.xhtml\.twital$/'] }    

Documentation

Go here http://twitalbundle.readthedocs.org/ to read a more detailed documentation about TwitalBundle.

Integration

TwitalBundle comes with all features that are already supported by TwigBundle (forms, translations, assetic, routing, etc).