nodeFactory = $nodeFactory; } /** * Merge field information configuration with default and render them. * * @return array Result array */ protected function renderFieldInformation(): array { $options = $this->data; $fieldInformation = $this->defaultFieldInformation; $fieldInformationFromTca = $options['parameterArray']['fieldConf']['config']['fieldInformation'] ?? []; ArrayUtility::mergeRecursiveWithOverrule($fieldInformation, $fieldInformationFromTca); $options['renderType'] = 'fieldInformation'; $options['renderData']['fieldInformation'] = $fieldInformation; return $this->nodeFactory->create($options)->render(); } /** * Merge field control configuration with default controls and render them. * * @return array Result array */ protected function renderFieldControl(): array { $options = $this->data; $fieldControl = $this->defaultFieldControl; $fieldControlFromTca = $options['parameterArray']['fieldConf']['config']['fieldControl'] ?? []; ArrayUtility::mergeRecursiveWithOverrule($fieldControl, $fieldControlFromTca); $options['renderType'] = 'fieldControl'; $options['renderData']['fieldControl'] = $fieldControl; return $this->nodeFactory->create($options)->render(); } /** * Merge field wizard configuration with default wizards and render them. * * @return array Result array */ protected function renderFieldWizard(): array { $options = $this->data; $fieldWizard = $this->defaultFieldWizard; $fieldWizardFromTca = $options['parameterArray']['fieldConf']['config']['fieldWizard'] ?? []; ArrayUtility::mergeRecursiveWithOverrule($fieldWizard, $fieldWizardFromTca); $options['renderType'] = 'fieldWizard'; $options['renderData']['fieldWizard'] = $fieldWizard; return $this->nodeFactory->create($options)->render(); } /** * Render a label element for the current field by given id. */ protected function renderLabel(string $for): string { $label = htmlspecialchars($this->data['parameterArray']['fieldConf']['label'] ?? ''); if ($this->getBackendUser()->shallDisplayDebugInformation()) { $fieldName = $this->data['flexFormContainerFieldName'] ?? $this->data['flexFormFieldName'] ?? $this->data['containerFieldName'] ?? $this->data['fieldName']; $label .= ' [' . htmlspecialchars($fieldName) . ']'; } $html = ''; $html .= $this->renderDescription(); return $html; } /** * Elements that don't render a simple input field can't have a '