环境 / eavbundle
Symfony2 Eav Bundle
0.0.2
2015-05-13 15:12 UTC
Requires
- php: >=5.4
- jms/di-extra-bundle: >=1.5
- symfony/symfony: >=2.6
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;
}