Skip to content

Commit

Permalink
ENH Use ::create to get DropdownField instance in DBEnum (#10175)
Browse files Browse the repository at this point in the history
This allows using alternate dropdown implementation.
  • Loading branch information
lekoala authored Dec 11, 2021
1 parent 0160008 commit 97ab957
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/FieldType/DBEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 97ab957

Please sign in to comment.