您好,我使用 Drupal 8 树枝,它无法捕捉到他的功能。
$TwigString = '<div>{{result}}{% include "some.html.twig" with {somevars:vars}%}</div>';
$Twig = new \Twig_Environment(new \Twig_Loader_String());
$Twig->setLoader(new \Twig_Loader_String());
$html = $Twig->render($TwigString,array("result" => "Success!"));
我懂了 :
成功!some.html.twig我应该怎么办 ?