ENH Use ::create to get DropdownField instance in DBEnum (#10175)

This allows using alternate dropdown implementation.
This commit is contained in:
Thomas Portelange 2021-12-11 08:12:07 +01:00 committed by GitHub
parent 01600086c9
commit 97ab957de8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,7 +140,7 @@ class DBEnum extends DBString
$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);
}