clarify set payload callbacks
This commit is contained in:
parent
b5a172a4b3
commit
f12509db96
1 changed files with 6 additions and 2 deletions
|
|
@ -50,7 +50,9 @@ class SetController extends Controller
|
|||
'name' => $set->getName(),
|
||||
],
|
||||
'elements' => array_map(
|
||||
$this->elementPayload(...),
|
||||
function (ElementLayoutNode $node): array {
|
||||
return $this->elementPayload($node);
|
||||
},
|
||||
$layout->getElements(),
|
||||
),
|
||||
]);
|
||||
|
|
@ -73,7 +75,9 @@ class SetController extends Controller
|
|||
'name' => $element->getName(),
|
||||
'kind' => $element->getKind(),
|
||||
'children' => array_map(
|
||||
$this->elementPayload(...),
|
||||
function (ElementLayoutNode $childNode): array {
|
||||
return $this->elementPayload($childNode);
|
||||
},
|
||||
$node->getChildren(),
|
||||
),
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue