环境/eavbundle

Symfony2 Eav Bundle

安装: 40

依赖项: 0

建议者: 0

安全: 0

星标: 2

关注者: 2

分支: 1

开放问题: 0

类型:symfony-bundle

0.0.2 2015-05-13 15:12 UTC

This package is not auto-updated.

Last update: 2024-10-02 08:30:37 UTC


README

#Eav Bundle

##1, 需求

jms_di_extra bundle

配置

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

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

路由

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

表单类型

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

内核

new Enviroment\EavBundle\EnviromentEavBundle(),

您的实体

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

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