biberltd / smarty-bundle
这个Symfony2组件提供了对Smarty3模板引擎的集成。
v1.2.3
2018-03-30 09:39 UTC
Requires
- php: >=5.3.3
- smarty/smarty: 3.1.*@stable
- symfony/framework-bundle: ~3.3|~3.4
Requires (Dev)
- symfony/assetic-bundle: ~2.6
- symfony/security: ~2.6
- symfony/yaml: ~2.6
Suggests
- knplabs/knp-menu-bundle: Smarty3 integration with KnpMenu (object oriented menus)
- liip/theme-bundle: Integration of Twitter Bootstrap into Symfony2 (themes)
- mopa/bootstrap-bundle: Integration of Twitter Bootstrap into Symfony2
- mopa/bootstrap-sandbox-bundle: Integration of Twitter Bootstrap into Symfony2 (extra)
- symfony/assetic-bundle: Assetic support in Smarty templates
This package is not auto-updated.
Last update: 2022-11-19 18:19:54 UTC
README
这个Symfony2组件提供了对Smarty3模板引擎的集成。
注意:此组件与Symfony的仓库同步开发。为了与Symfony 2.0.x达到最大兼容性,您需要使用此组件的1.0.x版本。
要求
安装
SmartyBundle支持Composer。
1. 在您的composer.json中添加SmartyBundle
{ "require": { "noiselabs/smarty-bundle": "dev-master" } }
现在运行以下命令让Composer下载该组件:
$ php composer.phar update noiselabs/smarty-bundle
Composer会将该组件安装到您的项目的vendor/noiselabs
目录。
2. 启用组件
在kernel中启用组件
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new NoiseLabs\Bundle\SmartyBundle\SmartyBundle(), ); }
3. 在配置中启用Smarty模板引擎
# app/config/config.yml framework: templating: { engines: ['twig', 'smarty'] }
有关其他安装方法(如Symfony-2.0 vendors脚本或git子模块),请参阅下面的文档。
文档
完整的文档可在Read the Docs上找到。
开发中的扩展
如果您想为SmartyBundle做出贡献,请在为以下扩展做出贡献时切换到以下分支。
- Assetic - assetic-extension
- Twitter Bootstrap - twitter-bootstrap
- 表单 - form-extension
- 安全 - 已完成,已合并到master
许可
此组件遵循LGPLv3许可证。有关详细信息,请参阅LICENSE文件。
作者
Vítor Brandão - vitor@noiselabs.org ~ twitter.com/noiselabs ~ blog.noiselabs.org
还可以参阅参与此项目的贡献者列表。
提交错误和功能请求
错误和功能请求在GitHub上进行跟踪。