mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #6924 from open-sausages/pulls/4.0/where-art-thou-file-2
Fix TreeDowndropField copying
This commit is contained in:
commit
79796083d1
@ -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…
x
Reference in New Issue
Block a user