proklung / timber-twig-bundle
为自定义Wordpress + Symfony的Timber/Twig扩展包。
1.2.7
2021-08-12 19:21 UTC
Requires
- php: >=7.3 || ^8.0
- symfony/config: ^4.0 || ^5.0
- symfony/dependency-injection: ^4.0 || ^5.0
- symfony/finder: ^4.0 || ^5.0
- symfony/http-kernel: ^4.0 || ^5.0
- twig/twig: ^2.14.6 | ^3
Requires (Dev)
- icanhazstring/composer-unused: ^0.7.5
- proklung/phpunit-testing-tools: ^1.4
- symfony/var-dumper: ^4.0 || ^5.0
README
内部
结果是在容器中出现服务 twig.instance
(和 twig
)带有配置的Twig实例。另外,容器加载后,Twig会自动链接到系统。
安装
composer.json
"repositories": [ { "type": "git", "url": "https://github.com/proklung/timber.twig.bundle" } ]
composer require proklung/timber-twig-bundle
配置
连接额外的Twig功能
主容器中twig
部分的示例
parameters: twig: functions: get_twig_header: Local\Services\TwigFunctionsExtended::renderHeader get_template_post: Local\Post::getTemplate