2016-11-24 78 views
1

我是一个初学者与奏鸣曲,我不明白我怎么能choicetype在一对多(下拉列表)与2表Oraganizations(一)和structures_type(许多)。
我在奏鸣曲文件中找不到任何东西。我使用了奏鸣曲2.3和symfony 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 
      )); 
} 

回答