shopery/view-bundle
Composer 安装命令:
composer require shopery/view-bundle
包简介
Integrate shopery/view in your symfony application
README 文档
README
Integrates shopery/view into your Symfony projects.
Installation
You can install this library:
- Install via composer:
composer require shopery/view-bundle - Use the official Git repository:
git clone https://github.com/shopery/view-bundle.
And add the bundle to your kernel as usual.
If you have any trouble, please refer to the symfony docs.
Factories
This bundle defines a service named view_factory which can be injected as a dependency.
This class implements Shopery\View\ViewFactory and has a createView method.
Tag any service with view_factory to register it as a factory for a given object.
services: my_view_factory_for_products: class: ... arguments: ... tags: - { name: view_factory, class: Acme\Product }
So whenever you pass an Acme\Product to view_factory::create_view, your factory is run.
Extensions
Multiple view extensions can be defined as services and tagged with the view_factory.extension tag.
This services must implement Shopery\View\Extension\ViewExtension.
统计信息
- 总下载量: 7.75k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-03-29