|
@@ -50,11 +50,20 @@ class FormContractor implements FormContractorInterface
|
|
|
return $options;
|
|
|
}
|
|
|
|
|
|
+ if ($type == 'sonata_type_admin') {
|
|
|
+ $fieldDescription->setOption('edit', 'inline');
|
|
|
+ }
|
|
|
+
|
|
|
// tweak the widget depend on the edit mode
|
|
|
if ($fieldDescription->getOption('edit') == 'inline') {
|
|
|
return $options;
|
|
|
}
|
|
|
|
|
|
+ if ($fieldDescription->getOption('edit') == 'standard')
|
|
|
+ {
|
|
|
+ return $options;
|
|
|
+ }
|
|
|
+
|
|
|
$options['class'] = $fieldDescription->getTargetEntity();
|
|
|
$options['data_class'] = $fieldDescription->getTargetEntity();
|
|
|
$options['model_manager'] = $fieldDescription->getAdmin()->getModelManager();
|