initializeResultArray(); if (!isset($this->data['renderData']['fieldWizard'])) { return $result; } $fieldWizard = $this->data['renderData']['fieldWizard']; $orderedFieldWizard = $this->dependencyOrderingService->orderByDependencies($fieldWizard); foreach ($orderedFieldWizard as $anOrderedFieldWizard => $orderedFieldWizardConfiguration) { if (isset($orderedFieldWizardConfiguration['disabled']) && $orderedFieldWizardConfiguration['disabled'] || !isset($fieldWizard[$anOrderedFieldWizard]['renderType']) ) { // Don't consider this control if disabled. // Also ignore if renderType is not given. // Missing renderType may happen if an element registers a default field control // as disabled, and TCA enabled that. If then additionally for instance the // element renderType is changed to an element that doesn't register the control // by default anymore, this would then fatal if we don't continue here. // @todo: the above scenario indicates a small configuration flaw, maybe log an error somewhere? continue; } $options = $this->data; $options['renderType'] = $fieldWizard[$anOrderedFieldWizard]['renderType']; $options['renderData']['fieldWizardOptions'] = $orderedFieldWizardConfiguration['options'] ?? []; $wizardResult = $this->nodeFactory->create($options)->render(); $result = $this->mergeChildReturnIntoExistingResult($result, $wizardResult); } return $result; } }