(mvc) add getTemplateNode to array field type to retrieve a read-only copy of the default model

This commit is contained in:
Ad Schellevis 2015-11-19 13:12:38 +01:00
parent 9a5a628bca
commit 708a1d017f

View File

@ -58,6 +58,16 @@ class ArrayField extends BaseField
}
}
/**
* retrieve read only template with defaults (copy of internal structure)
* @return null|BaseField template node
*/
public function getTemplateNode()
{
$result = clone $this->internalTemplateNode;
return $result;
}
/**
* add new node containing the types from the first node (copy)
* @return ContainerField created node