data['parameterArray']; $flexFormDataStructureArray = $this->data['flexFormDataStructureArray']; $flexFormRowData = $this->data['flexFormRowData']; $resultArray = $this->initializeResultArray(); // Determine this single sheet name, most often it ends up with sDEF, except if only one sheet was defined $flexFormSheetNames = array_keys($flexFormDataStructureArray['sheets']); $sheetName = array_pop($flexFormSheetNames); $flexFormRowDataSubPart = $flexFormRowData['data'][$sheetName]['lDEF'] ?? []; unset($flexFormDataStructureArray['meta']); if (!is_array($flexFormDataStructureArray['sheets'][$sheetName]['ROOT']['el'])) { $resultArray['html'] = 'Data Structure ERROR: No [\'ROOT\'][\'el\'] element found in flex form definition.'; return $resultArray; } $options = $this->data; $options['flexFormDataStructureArray'] = $flexFormDataStructureArray['sheets'][$sheetName]['ROOT']['el']; $options['flexFormRowData'] = $flexFormRowDataSubPart; $options['flexFormSheetName'] = $sheetName; $options['flexFormFormPrefix'] = '[data][' . $sheetName . '][lDEF]'; $options['parameterArray'] = $parameterArray; $resultArray = $this->initializeResultArray(); $fieldInformationResult = $this->renderFieldInformation(); $resultArray['html'] = $fieldInformationResult['html']; $resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $fieldInformationResult, false); $options['renderType'] = 'flexFormElementContainer'; $childResult = $this->nodeFactory->create($options)->render(); return $this->mergeChildReturnIntoExistingResult($resultArray, $childResult, true); } }