proklung/ bitrix-twig-bundle
为自定义 Bitrix + Symfony 提供的 Twig 扩展包。
1.0.2
2021-08-15 11:55 UTC
Requires
- php: >=7.3 || ^8.0
- symfony/config: ^4.4 || ^5.0
- symfony/dependency-injection: ^4.4 || ^5.0
- symfony/http-kernel: ^4.4 || ^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
This package is auto-updated.
Last update: 2024-09-15 18:52:12 UTC
README
因此,在容器中会出现一个配置好的 twig.instance
(以及 twig
)服务,没有复杂的装饰和高级配置。
此外,在容器加载后,Twig 会自动连接到系统中。
安装
composer.json
"repositories": [ { "type": "git", "url": "https://github.com/proklung/bitrix.twig.bundle" } ]
composer require proklung/bitrix-twig-bundle
在 standalone_bundles.php
中连接此扩展包
return [ Prokl\BitrixTwigBundle\BitrixTwigBundle::class => ['all' => true], ];
依赖于 包,其中处理 framework.yaml
文件中的配置
类型
framework: twig: # Пути к шаблонам default_path: '%kernel.project_dir%/local/twig' paths: '%kernel.project_dir%/local/twig': ~ # С namespace '%kernel.project_dir%/../../vendor/symfony/web-profiler-bundle/Resources/views': WebProfiler cache: false cache_dir: '%kernel.project_dir%/bitrix/cache/twig' autoescape: 'name' autoescape_service: ~ autoescape_service_method: ~ base_template_class: 'Twig\Template' debug: '%kernel.debug%' strict_variables: '%kernel.debug%'