[BUGFIX] Remove deprecated call in InlineRecordContainer 16/46916/2
authorFrank Naegler <frank.naegler@typo3.org>
Fri, 26 Feb 2016 15:55:49 +0000 (16:55 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 26 Feb 2016 16:10:59 +0000 (17:10 +0100)
This patch removes the usage of the deprecated FlashMessage->render
method and add a custom markup instead.

Resolves: #73703
Releases: master, 7.6
Change-Id: I1c84aa0c353a26fdc62d7d16fca5cdfc22326156
Reviewed-on: https://review.typo3.org/46916
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php

index 92a49ce..b79b938 100644 (file)
@@ -247,13 +247,22 @@ class InlineRecordContainer extends AbstractContainer
             if (!empty($parentConfig['appearance']['overwriteCombinationWarningMessage'])) {
                 $combinationWarningMessage = $parentConfig['appearance']['overwriteCombinationWarningMessage'];
             }
-            $flashMessage = GeneralUtility::makeInstance(
-                FlashMessage::class,
-                $this->getLanguageService()->sL($combinationWarningMessage),
-                '',
-                FlashMessage::WARNING
-            );
-            $resultArray['html'] = $flashMessage->render();
+            $message = $this->getLanguageService()->sL($combinationWarningMessage);
+            $markup = [];
+            $markup[] = '<div class="alert alert-warning">';
+            $markup[] = '    <div class="media">';
+            $markup[] = '        <div class="media-left">';
+            $markup[] = '            <span class="fa-stack fa-lg">';
+            $markup[] = '                <i class="fa fa-circle fa-stack-2x"></i>';
+            $markup[] = '                <i class="fa fa-exclamation fa-stack-1x"></i>';
+            $markup[] = '            </span>';
+            $markup[] = '        </div>';
+            $markup[] = '        <div class="media-body">';
+            $markup[] = '            <div class="alert-message">' . htmlspecialchars($message) .  '</div>';
+            $markup[] = '        </div>';
+            $markup[] = '    </div>';
+            $markup[] = '</div>';
+            $resultArray['html'] = implode(LF, $markup);
         }
 
         $childArray = $this->renderChild($childData);