Commit 05d12917 authored by Avris's avatar Avris

readme

parent d2383ba5
## Micrus Twig Bridge ##
# Micrus Twig Bridge ##
This is a module for [Micrus framework](https://micrus.avris.it) that allows you
to integrate it with [Twig](http://twig.sensiolabs.org/) template engine.
### Installation
## Installation
In your `App\App:registerModules` register the module:
Run:
yield new \Avris\Micrus\Twig\TwigModule;
composer require avris/micrus-twig
then run:
Then register the module in your `App\App:registerModules`:
composer require avris/micrus-twig
yield new \Avris\Micrus\Twig\TwigModule;
### Usage
## Usage
Just put your `*.twig` templates in the `/templates` directory and render them in your controller.
If you don't specify an extension, `.html.twig` will be assumed:
......@@ -37,7 +37,7 @@ Also some helper functions are provided:
* `canAccess('check', object)`
* `dump(object)`
### Extending Twig
## Extending Twig
To create Twig extension, please follow [its documentation](http://twig.sensiolabs.org/doc/advanced.html#creating-an-extension).
......@@ -48,7 +48,7 @@ To do it manually, just declare it with a tag `twigExtension`:
App\Service\MyTwigExtension:
tags: [twigExtension]
### Copyright ###
## Copyright ###
* **Author:** Andrzej Prusinowski [(Avris.it)](https://avris.it)
* **Licence:** [MIT](https://mit.avris.it)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment