From 97ab957de826bb9bfefa56f079189862ea12a7e3 Mon Sep 17 00:00:00 2001 From: Thomas Portelange Date: Sat, 11 Dec 2021 08:12:07 +0100 Subject: [PATCH] ENH Use ::create to get DropdownField instance in DBEnum (#10175) This allows using alternate dropdown implementation. --- src/ORM/FieldType/DBEnum.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ORM/FieldType/DBEnum.php b/src/ORM/FieldType/DBEnum.php index 8293740b0ea..e358b8dc99a 100644 --- a/src/ORM/FieldType/DBEnum.php +++ b/src/ORM/FieldType/DBEnum.php @@ -140,7 +140,7 @@ public function formField($title = null, $name = null, $hasEmpty = false, $value $name = $this->getName(); } - $field = new DropdownField($name, $title, $this->enumValues(false), $value); + $field = DropdownField::create($name, $title, $this->enumValues(false), $value); if ($hasEmpty) { $field->setEmptyString($emptyString); }