2017 © Pedro Peláez
 

symfony1-plugin axis-twig-plugin

symfony 1.x plugin that integrates twig templating engine to be used with symfony.

image

axis/axis-twig-plugin

symfony 1.x plugin that integrates twig templating engine to be used with symfony.

  • Wednesday, March 18, 2015
  • by 7heaven
  • Repository
  • 1 Watchers
  • 1 Stars
  • 141 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

AxisTwigPlugin

This plugin integrates Twig templating engine into symfony., (*1)

Installation

Composer way

Just add axis/axis-twig-plugin dependency to your composer.json file:, (*2)

"require": {
  "axis/axis-twig-plugin": "dev-master"
}

Configuration

You can configure Twig environment using factories.yml (see AxisServiceContainerPlugin)., (*3)

Usage

You can use Twig directly by retrieving Twig Environment from context service container:, (*4)

$twig = sfContext::getInstance()->get('twig');
$twig->loadTemplate($pathToTemplate)->render($variables);

or as symfony view by setting it as view class in module.yml:, (*5)

all:
  view_class: \Axis\S1\Twig\View\Base # means BaseView
  partial_view_class: \Axis\S1\Twig\View\Base # means BasePartialView

after that your application will switch to .twig templates for layouts, partials and action views., (*6)

The Versions

18/03 2015

dev-master

9999999-dev https://github.com/e1himself/axis-twig-plugin

symfony 1.x plugin that integrates twig templating engine to be used with symfony.

  Sources   Download

MIT

The Requires

 

templating twig symfony