2016-11-24 4 views
1

나는 초급자로 소나타입니다. Oraganizations (1 개)과 structures_type (다수)이있는 많은 (드롭 다운 목록)에서 choicetype을 어떻게 할 수 있는지 이해할 수 없습니다.
소나타 문서에서 아무 것도 찾을 수 없습니다. 소나타 2.3 및 심포니 2.8을 사용합니다.
누군가가이 문제를 해결하는 데 도움을 줄 수있는 경우 코드는 다음과 같습니다.소나타와 일대일 관계

protected function configureFormFields(FormMapper $formMapper) 
{ 
    $formMapper 
      ->add('structurestypes', EntityType::class, array(
       'class' => 'HandissimoBundle:StucturesTypes', 
       'choice_label' => 'structurestype', 
       'label' => 'Type de structure', 
       'expanded' => true, 
       'multiple' => true, 
       'by_reference' => true 
      )); 
} 

답변