shopery/view-bundle

Integrate shopery/view in your symfony application

Installs: 7 745

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 5

Forks: 0

Open Issues: 0

Type:symfony-bundle

v1.2 2016-06-23 10:36 UTC

This package is not auto-updated.

Last update: 2024-11-07 01:18:45 UTC


README

Integrates shopery/view into your Symfony projects.

Installation

You can install this library:

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.