瀏覽代碼

Use default admin class for sonata_type_admin.

Romain Geissler 13 年之前
父節點
當前提交
53e918a900
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Builder/FormContractor.php

+ 1 - 0
Builder/FormContractor.php

@@ -126,6 +126,7 @@ class FormContractor implements FormContractorInterface
                 throw new \RuntimeException(sprintf('The current field `%s` is not linked to an admin. Please create one for the target entity : `%s`', $fieldDescription->getName(), $fieldDescription->getTargetEntity()));
             }
 
+            $options['data_class']=$fieldDescription->getAssociationAdmin()->getClass();
             $fieldDescription->setOption('edit','admin');
         } else if ($type == 'sonata_type_collection') {