Skip to content

Instantly share code, notes, and snippets.

@janit
Created September 13, 2015 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janit/43b8b475d1af9926b525 to your computer and use it in GitHub Desktop.
Save janit/43b8b475d1af9926b525 to your computer and use it in GitHub Desktop.
Twigriot 2
class RiotRendererExtension extends \Twig_Extension
{
public function getName() {
return "riot_render";
}
public function getFunctions() {
return array(
'riot_render' => new \Twig_Function_Method($this, 'riotRenderer',
array('is_safe' => array('html'))
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment