chilldev/proxy-templating-bundle

Dynamic templating proxy references bundle for Symfony2.

This package's canonical repository appears to be gone and the package has been frozen as a result.

0.0.3 2013-11-06 00:57 UTC

This package is not auto-updated.

Last update: 2019-03-01 00:18:44 UTC


README

ChillDevProxyTemplatingBundle is a Symfony2 bundle that allows you to define globaly default templating engine for your system (for bundles that depends on this feature).

Build Status Scrutinizer Quality Score Coverage Status Dependency Status SensioLabsInsight

Installation

This bundle is provided as Composer package. To install it simply add following dependency definition to your composer.json file:

"chilldev/proxy-templating-bundle": "dev-master"

Replace dev-master with different constraint if you want to use specific version.

Note: This bundle requires PHP 5.4.

Configuration

In order to use this bundle, load it in your kernel:

<?php

use ChillDev\Bundle\ProxyTemplatingBundle\ChillDevProxyTemplatingBundle;

use Symfony\Component\HttpKernel\Kernel as BaseKernel;

class Kernel extends BaseKernel
{
    public function registerBundles()
    {
        $bundles = [
            new ChillDevProxyTemplatingBundle(),
        ];
    }
}

Enabe templating switching:

framework:
    templating:
        engines:
            - "twig"
            - "php"
            - "default" # you need to add this engine to your configuration

And then configure proxy:

chilldev_proxytemplating:
    templating: "php"

See configuration options for details.

Usage

ChillDevProxyTemplatingBundle doesn't really provide any features. It's just a system-wide proxy templating redirector. All you need to do in order to pass template to proxy is to use it's name as engine, for example by rendering Bundle:Controller:action.html.default or by using @Template(engine="default") annotation. For more detailed examples see usage documentation.

Resources

Contributing

Do you want to help improving this project? Simply fork it and post a pull request. You can do everything on your own, you don't need to ask if you can, just do all the awesome things you want!

This project is published under MIT license.

Authors

ChillDevProxyTemplatingBundle is brought to you by Chillout Development.

List of contributors: