From 46d72c8fd90ab979694c135de8381cc18fedfe82 Mon Sep 17 00:00:00 2001 From: Simon Gilli Date: Mon, 21 Sep 2020 20:24:01 +0200 Subject: [PATCH] [TASK] Add field `flag` to LanguageMenuProcessor This patch adds the missing field `flag` from the site configuration to the LanguageMenuProcessor. The field could be used now to show the flag icon in a language menu out of the box and without workarounds. Resolves: #84926 Releases: master, 10.4 Change-Id: Ie27bed551a96cae8c6b20913105ff95db7f61942 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65814 Tested-by: Simon Gilli Tested-by: TYPO3com Tested-by: Georg Ringer Reviewed-by: Simon Gilli Reviewed-by: Georg Ringer --- .../Classes/DataProcessing/LanguageMenuProcessor.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/typo3/sysext/frontend/Classes/DataProcessing/LanguageMenuProcessor.php b/typo3/sysext/frontend/Classes/DataProcessing/LanguageMenuProcessor.php index 218563ec5c5a..424d7ef886a0 100644 --- a/typo3/sysext/frontend/Classes/DataProcessing/LanguageMenuProcessor.php +++ b/typo3/sysext/frontend/Classes/DataProcessing/LanguageMenuProcessor.php @@ -202,6 +202,17 @@ class LanguageMenuProcessor implements DataProcessorInterface 'wrap' => ',"direction":|' ] ], + '25' => 'USER', + '25.' => [ + 'userFunc' => 'TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor->getFieldAsJson', + 'language.' => [ + 'data' => 'register:languageId' + ], + 'field' => 'flag', + 'stdWrap.' => [ + 'wrap' => ',"flag":|' + ] + ], '90' => 'TEXT', '90.' => [ 'value' => self::LINK_PLACEHOLDER,