mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 09:34:39 +00:00
(mvc) add getTemplateNode to array field type to retrieve a read-only copy of the default model
This commit is contained in:
parent
9a5a628bca
commit
708a1d017f
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user