Symfony2表格-复合体“;不动产;选项
我有以下实体,具有主要属性:Symfony2表格-复合体“;不动产;选项,symfony,Symfony,我有以下实体,具有主要属性: 位置 身份证 名字 地址 类型 站 位置标识 三角形 海拔高度 学会 位置标识 删节 部门 Station和Institute从Location“继承”:这两个表的任何Location\u id都引用Location表中的id 正如您所猜测的,不同类型的地点有着共同的特点(在地点中收集),但也有独立的特点(在车站和研究所表格中收集) 我也有一个实体“项目”,项目可以放置和移动在一个位置,无论它是一个站点还是一个机构 因此,在我的“移动项目”表单中,我
- 位置
- 身份证
- 名字
- 地址
- 类型
- 站
- 位置标识
- 三角形
- 海拔高度
- 学会
- 位置标识
- 删节
- 部门
- “location.name-station.trigam”,如果location.type是station
- 如果location.type为Institute,“location.name-inittute.abrevision”
$builder->add('location', 'genemu_jqueryselect2_entity', array(
'class' => 'MyBundle:Location',
'property' => 'labelSelect2',
'query_builder' => function(LocationRepository $lr) {
return $lr->createQueryBuilder('l')
->orderBy('l.name', 'ASC');}
))