Explorar o código

[FormContractor][type=admin] 'edit' option defaults to 'admin' if not defined

Romain Geissler %!s(int64=13) %!d(string=hai) anos
pai
achega
893a229ff4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Builder/FormContractor.php

+ 1 - 1
Builder/FormContractor.php

@@ -130,7 +130,7 @@ class FormContractor implements FormContractorInterface
             }
 
             $options['data_class']=$fieldDescription->getAssociationAdmin()->getClass();
-            $fieldDescription->setOption('edit','admin');
+            $fieldDescription->setOption('edit', $fieldDescription->getOption('edit', 'admin'));
         } else if ($type == 'sonata_type_collection') {
 
             if (!$fieldDescription->getAssociationAdmin()) {