Only one top-level tag supported in array output
When doing \Civi\Api4\Afform::get()
you see results like this:
{
"name": "testAfform",
"title": "This is a test",
"layout": {
"#tag": "af-form",
"ctrl": "modelListCtrl",
"#children": [
{
"#tag": "div",
"crm-ui-debug": "modelListCtrl.getEntity('parent')"
},
...
Notice that layout
is an object. I would have expected an array of tags, but instead it is the contents of the first tag in the document. What if the html document contains more than one top-level tag?