enviroment/eavbundle

Symfony2 Eav Bundle

Installs: 40

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 1

Open Issues: 0

Type:symfony-bundle

0.0.2 2015-05-13 15:12 UTC

This package is not auto-updated.

Last update: 2024-04-17 06:33:42 UTC


README

#Eav Bundle

##1, Require

jms_di_extra bundle

config

- { resource: "@EnviromentEavBundle/Resources/config/config.yml" }

jms_di_extra:
    locations:
        all_bundles: false
        bundles: [ EnviromentEavBundle ]
        directories: ["%kernel.root_dir%/../src"]

routing

enviroment_eav:
    resource: "@EnviromentEavBundle/Resources/config/routing.yml"
    prefix:   /attribute

FormType

->add('attributes', 'attributeCollection', array(
            'type' => new AttributeType()
        ))

Kernel

new Enviroment\EavBundle\EnviromentEavBundle(),

Your entity

use Enviroment\EavBundle\Annotation as EAV;
use Enviroment\EavBundle\Entity\AttributedEntityTrait;

/**
 * Entity
 * @EAV\Entity()
 ...
 */
class Entity 
{
    use AttributedEntityTrait;
}