Skip to content

Commit

Permalink
Replaced AbstractMessage wrapper with ContextualFeedbackServerity
Browse files Browse the repository at this point in the history
  • Loading branch information
hojalatheef committed Apr 8, 2024
1 parent c330e21 commit 198f249
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions Classes/Controller/CheckoutController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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');
}
Expand All @@ -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');
}
Expand All @@ -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()]);
Expand All @@ -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');
}
Expand All @@ -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
);
}
}
Expand All @@ -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');
}
Expand All @@ -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 {
Expand All @@ -210,7 +210,7 @@ public function cancelAction(string $email, string $activationCode, bool $confir
]
),
'',
AbstractMessage::WARNING
ContextualFeedbackSeverity::WARNING
);
} else {
$this->addFlashMessage(
Expand All @@ -219,7 +219,7 @@ public function cancelAction(string $email, string $activationCode, bool $confir
'reserve'
),
'',
AbstractMessage::WARNING
ContextualFeedbackSeverity::WARNING
);
}

Expand Down
4 changes: 2 additions & 2 deletions Classes/DataHandler/FacilityClearCacheAfterUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 198f249

Please sign in to comment.