Commit 708a1d01 authored by Ad Schellevis's avatar Ad Schellevis

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

parent 9a5a628b
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment