mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-30 05:09:06 +02:00
Fix TreeDowndropField copying
This commit is contained in:
parent
4c1a4eb474
commit
0534a5ec0c
@ -637,6 +637,21 @@ class TreeDropdownField extends FormField
|
|||||||
return $copy;
|
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()
|
public function getSchemaStateDefaults()
|
||||||
{
|
{
|
||||||
$data = parent::getSchemaStateDefaults();
|
$data = parent::getSchemaStateDefaults();
|
||||||
|
Loading…
Reference in New Issue
Block a user