我想在symfony2项目中加载一个新的扩展,twig但我不知道我应该在哪里放下线来工作:
$twig = new Twig_Environment($loader, $config);
$twig->addExtension(new Twig_Extension_Debug());
Run Code Online (Sandbox Code Playgroud)
PMo*_*bed 24
我可以为twig添加调试,如下所示:
# app/config/config.yml
services:
acme_hello.twig.extension.debug:
class: Twig_Extension_Debug
tags:
- { name: 'twig.extension' }
Run Code Online (Sandbox Code Playgroud)
看看这里的更多细节;
| 归档时间: |
|
| 查看次数: |
11887 次 |
| 最近记录: |