Skip to content
This repository has been archived by the owner on Aug 8, 2022. It is now read-only.

Add TYPO3 8 compatible FlashMessage Rendering in update script #501

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions class.ext_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ protected function processClearCache()
if ($this->clearCache) {

// Init TCE
$TCE = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$TCE = GeneralUtility::makeInstance(TYPO3\CMS\Core\DataHandling\DataHandler::class);
$TCE->admin = 1;
$TCE->clear_cacheCmd('all');

Expand Down Expand Up @@ -192,19 +192,19 @@ protected function messageTitleFromRow(array $row)
*/
protected function generateOutput()
{
$output = '';

$flashMessageService = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessageService::class);
$messageQueue = $flashMessageService->getMessageQueueByIdentifier();
foreach ($this->messageList as $message) {
$flashMessage = GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
FlashMessage::class,
$message[2],
$message[1],
$message[0]
);
$output .= $flashMessage->render();
$messageQueue->addMessage($flashMessage);
}

return $output;
return $messageQueue->renderFlashMessages();
}


Expand Down