nyrodev/php-template-bundle
最新稳定版本:v6.1
Composer 安装命令:
composer require nyrodev/php-template-bundle
包简介
Symfony Bundle to keep using PHP templates
README 文档
README
Symfony Bundle in order to keep using PHP template
This was not tested properly, use with caution
Instalation
composer require nyrodev/php-template-bundle dev-master
Usage
As you did before on Symfony 4, simply use your php template when rendering something. Usage examples :
$this->render('Admin/template.html.php', /* ... */);
$this->render('@MyBundle/Admin/template.html.php', /* ... */);
All helpers extings on Symfony 4 was also ported, like assets, form, session, etc...
It means you can still use them on your PHP templates with $view['helper']->call()
Moreover, the tag templating.helper is still working.
You can still define your own PHP template helper by simply adding this tag, just like before.
You can also implements the NyroDev\PhpTemplateBundle\Helper\HelperInterface interface in order to be available from your view using the alias return by getAlias.
Notes
PHP Form templates does NOT work.
It requires more works and it shouldn't be too much work to rewrite only these templates into Twig.
Many source code comes from the last version 4 of framework bundle. For now, the only changes made on these files have been removing deprecation notices and changing namespaces.
统计信息
- 总下载量: 560
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-07-01