From 198f249225f2f42512e31038e3ca8e9ca32356d9 Mon Sep 17 00:00:00 2001 From: Hoja Mustaffa Abdul Latheef Date: Mon, 8 Apr 2024 19:50:07 +0200 Subject: [PATCH] Replaced AbstractMessage wrapper with ContextualFeedbackServerity --- Classes/Controller/CheckoutController.php | 20 +++++++++---------- .../FacilityClearCacheAfterUpdate.php | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Classes/Controller/CheckoutController.php b/Classes/Controller/CheckoutController.php index 2683664f..b6468b3e 100644 --- a/Classes/Controller/CheckoutController.php +++ b/Classes/Controller/CheckoutController.php @@ -21,7 +21,7 @@ use JWeiland\Reserve\Service\DataTablesService; use JWeiland\Reserve\Utility\CacheUtility; use JWeiland\Reserve\Utility\OrderSessionUtility; -use TYPO3\CMS\Core\Messaging\AbstractMessage; +use TYPO3\CMS\Core\Type\ContextualFeedbackSeverity; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Annotation as Extbase; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; @@ -100,7 +100,7 @@ public function formAction(Period $period): void $this->addFlashMessage( LocalizationUtility::translate('list.alerts.isBookingAllowed', 'reserve'), '', - AbstractMessage::INFO + ContextualFeedbackSeverity::INFO ); $this->redirect('list'); } @@ -123,7 +123,7 @@ public function createAction(Order $order, int $furtherParticipants = 0): void $this->addFlashMessage( 'You are not allowed to order right now.', '', - AbstractMessage::ERROR + ContextualFeedbackSeverity::ERROR ); $this->redirect('list'); } @@ -137,7 +137,7 @@ public function createAction(Order $order, int $furtherParticipants = 0): void $this->addFlashMessage( LocalizationUtility::translate('list.alerts.wrongAmountOfReservations', 'reserve'), '', - AbstractMessage::ERROR + ContextualFeedbackSeverity::ERROR ); $this->redirect('form', null, null, ['period' => $order->getBookedPeriod()]); @@ -151,7 +151,7 @@ public function confirmAction(string $email, string $activationCode): void $this->addFlashMessage( 'Your order is already confirmed! Please check your mailbox.', '', - AbstractMessage::INFO + ContextualFeedbackSeverity::INFO ); $this->redirect('list'); } @@ -161,7 +161,7 @@ public function confirmAction(string $email, string $activationCode): void $this->addFlashMessage( 'Could not find any order with current combination of email and activation code.', '', - AbstractMessage::ERROR + ContextualFeedbackSeverity::ERROR ); } } @@ -175,7 +175,7 @@ public function cancelAction(string $email, string $activationCode, bool $confir $this->addFlashMessage( 'Could not find any order with current combination of email and activation code.', '', - AbstractMessage::ERROR + ContextualFeedbackSeverity::ERROR ); $this->redirect('list'); } @@ -191,7 +191,7 @@ public function cancelAction(string $email, string $activationCode, bool $confir $this->addFlashMessage( 'Could not cancel your order. Please contact the administrator!', '', - AbstractMessage::ERROR + ContextualFeedbackSeverity::ERROR ); } } else { @@ -210,7 +210,7 @@ public function cancelAction(string $email, string $activationCode, bool $confir ] ), '', - AbstractMessage::WARNING + ContextualFeedbackSeverity::WARNING ); } else { $this->addFlashMessage( @@ -219,7 +219,7 @@ public function cancelAction(string $email, string $activationCode, bool $confir 'reserve' ), '', - AbstractMessage::WARNING + ContextualFeedbackSeverity::WARNING ); } diff --git a/Classes/DataHandler/FacilityClearCacheAfterUpdate.php b/Classes/DataHandler/FacilityClearCacheAfterUpdate.php index 8d72353e..7e0ad2ae 100644 --- a/Classes/DataHandler/FacilityClearCacheAfterUpdate.php +++ b/Classes/DataHandler/FacilityClearCacheAfterUpdate.php @@ -17,9 +17,9 @@ use TYPO3\CMS\Core\Database\Query\QueryBuilder; use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction; use TYPO3\CMS\Core\DataHandling\DataHandler; -use TYPO3\CMS\Core\Messaging\AbstractMessage; use TYPO3\CMS\Core\Messaging\FlashMessage; use TYPO3\CMS\Core\Messaging\FlashMessageService; +use TYPO3\CMS\Core\Type\ContextualFeedbackSeverity; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Utility\LocalizationUtility; @@ -98,7 +98,7 @@ public function processDataHandlerResultAfterAllOperations(DataHandler $dataHand FlashMessage::class, LocalizationUtility::translate('flashMessage.clearedCacheForFacility', 'reserve', [implode(', ', $this->facilityNames)]), '', - AbstractMessage::INFO + ContextualFeedbackSeverity::INFO ); $flashMessageQueue->addMessage($flashMessage);