mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fix TreeDowndropField copying
This commit is contained in:
parent
4c1a4eb474
commit
0534a5ec0c
@ -636,6 +636,21 @@ class TreeDropdownField extends FormField
|
||||
$copy->setSourceObject($this->sourceObject);
|
||||
return $copy;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|FormField $classOrCopy
|
||||
* @return FormField
|
||||
*/
|
||||
public function castedCopy($classOrCopy)
|
||||
{
|
||||
$field = $classOrCopy;
|
||||
|
||||
if (!is_object($field)) {
|
||||
$field = new $classOrCopy($this->name, $this->title, $this->sourceObject);
|
||||
}
|
||||
|
||||
return parent::castedCopy($field);
|
||||
}
|
||||
|
||||
public function getSchemaStateDefaults()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user