Przeglądaj źródła

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

Romain Geissler 13 lat temu
rodzic
commit
893a229ff4
1 zmienionych plików z 1 dodań i 1 usunięć
  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()) {