Symfony 2.6.1을 사용하고 있습니다.Sonata Admin에서 m2m 관계를 구성하는 방법은 무엇입니까?
엔티티 구성 : http://pastebin.com/rMkYHjkE
관리 클래스 :
내가 선택한 개체 편집하려고class PlaceAdmin extends Admin
{
// Fields to be shown on create/edit forms
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
//other fields
->add('types', 'collection', array(
'type' => new PlaceType,
'allow_add' => true,
));
;
}
//other stuff
}
:
유형 "문자열의예상 인수, 심포니 \ 구성 요소 \ 양식 \ ResolvedFormTypeInterface 또는 Symfony \ Component \ Form \ FormTypeInterface ", "Syloc \ Bundle \ GooglePlacesBu ndle \ 엔티티 \ PlaceType는 "the docs에서