Explorar o código

Use default admin class for sonata_type_admin.

Romain Geissler %!s(int64=13) %!d(string=hai) anos
pai
achega
53e918a900
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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') {