mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENH Use ::create to get DropdownField instance in DBEnum (#10175)
This allows using alternate dropdown implementation.
This commit is contained in:
parent
01600086c9
commit
97ab957de8
@ -140,7 +140,7 @@ class DBEnum extends DBString
|
|||||||
$name = $this->getName();
|
$name = $this->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
$field = new DropdownField($name, $title, $this->enumValues(false), $value);
|
$field = DropdownField::create($name, $title, $this->enumValues(false), $value);
|
||||||
if ($hasEmpty) {
|
if ($hasEmpty) {
|
||||||
$field->setEmptyString($emptyString);
|
$field->setEmptyString($emptyString);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user