是否可以sonata_type_collection针对自定义表单类型而不是与另一个实体的属性/关系使用?
像这样的东西:
$formMapper->add('foo', 'sonata_type_collection',
    array('type' => new \myVendor\myBundleBundle\Form\Type\BlockType() 
));
这引发了以下错误
The current field `contingut` is not linked to an admin. Please create one for the target entity : ``
编辑:
像这样的东西起到了作用:
$formMapper->add('contingut', 'collection', array(                                 
    'type' => new \myVendor\myBundleBundle\Form\Type\Block1Type(),
    'allow_add' => true,
    'allow_delete' => true,
    'by_reference' => false 
));