2 declare(strict_types = 1);
42 if (!isset($this->data[
'renderData'][
'fieldInformation'])) {
46 $fieldInformations = $this->data[
'renderData'][
'fieldInformation'];
47 $orderingService = GeneralUtility::makeInstance(DependencyOrderingService::class);
48 $orderedFieldInformation = $orderingService->orderByDependencies($fieldInformations,
'before',
'after');
50 foreach ($orderedFieldInformation as $anOrderedFieldInformation => $orderedFieldInformationConfiguration) {
51 if (isset($orderedFieldInformationConfiguration[
'disabled']) && $orderedFieldInformationConfiguration[
'disabled']
52 || !isset($fieldInformations[$anOrderedFieldInformation][
'renderType'])
65 $options[
'renderType'] = $fieldInformations[$anOrderedFieldInformation][
'renderType'];
66 $options[
'renderData'][
'fieldInformationOptions'] = $orderedFieldInformationConfiguration[
'options'] ?? [];
67 $informationResult = $this->nodeFactory->create($options)->render();
69 $allowedTags =
'<a><br><br/><div><em><i><p><strong><span><code>';
70 if (strip_tags($informationResult[
'html'], $allowedTags) !== $informationResult[
'html']) {
71 throw new \RuntimeException(
72 'The field information API supports only a limited number of HTML tags within the result'
73 .
' HTML of children. Allowed tags are: "' . $allowedTags .
'" Child'
74 .
' ' . $options[
'renderType'] .
' violated this rule. Either remove offending tags or'
75 .
' switch to a different API like "fieldWizard" or "fieldControl".',