Skip to content

frizzy/SlimTwigExtension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slim Framework Twig Extension

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages