Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

twig render string

$twig = clone $this->get('twig');
$twig->setLoader(new Twig_Loader_String());
$rendered = $twig->render(
  "Test string template: {{ result|humanize }}",
  array("result" => "mega_success")
);
Source by techpunch.co.uk #
 
PREVIOUS NEXT
Tagged: #twig #render #string
ADD COMMENT
Topic
Name
7+9 =