frizzy / slim-twig-extension
Twig extension for the Slim framework
This package is not auto-updated.
Last update: 2024-12-17 02:04:34 UTC
README
Usage
Add the following to your root composer.json file:
{
"require": {
"frizzy/slim-twig-extension": "0.1.*"
}
}
Add the extension to your Twig environment:
<?php
$twig = new \Twig_Environment(new \Twig_Loader_Filesystem(...));
$twig->addExtension(new \Frizzy\Slim\Twig\Extension);
?>
Functions available in Twig:
- render_route_name
- render_route_path
- render_template
- path
- url