From 3b729d0cbdbec3d47693401a3dd8493e42648c72 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 25 Oct 2019 18:51:07 -0700 Subject: [PATCH] FormDataModel::parseFields() - Rename param for clarity This function uses a recursive algorithm to scan subtrees. Each call to the algorithm is a particular HTML element. --- ext/afform/core/Civi/Afform/FormDataModel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/afform/core/Civi/Afform/FormDataModel.php b/ext/afform/core/Civi/Afform/FormDataModel.php index 15e0a12b3f..03a1413a41 100644 --- a/ext/afform/core/Civi/Afform/FormDataModel.php +++ b/ext/afform/core/Civi/Afform/FormDataModel.php @@ -38,18 +38,18 @@ class FormDataModel { } /** - * @param array $layout + * @param array $element * The root element of the layout, in shallow/deep format. * @param array $entities * A list of entities, keyed by named. * This will be updated to include 'fields'. * Ex: $entities['spouse']['type'] = 'Contact'; */ - protected static function parseFields($layout, &$entities) { - if (!isset($layout['#children'])) { + protected static function parseFields($element, &$entities) { + if (!isset($element['#children'])) { return; } - foreach ($layout['#children'] as $child) { + foreach ($element['#children'] as $child) { if (is_string($child)) { //nothing } -- 2.25.1