TYPO3 8.7
In my controller I've included everything I can think of:
use TYPO3\CMS\Core\Messaging\FlashMessage;
use TYPO3\CMS\Core\Messaging\AbstractMessage;
use TYPO3\CMS\Core\Messaging\FlashMessageService;
... And following the documentation at https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/FlashMessages/Index.html I have done the following in the action (note: I have tried both AbsractMessage and FlashMessage, same result):
$locationName = $location->getName();
$messageBody = "$locationName has been successfully deleted";
$messageTitle = 'Location Deleted';
$this->addFlashMessage(
$messageBody,
$messageTitle,
$severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::OK,
$storeInSession = TRUE
);
... but all I get for output is:
Location Deleted
flashtest has been successfully deleted
... but I should be getting a nice green box with styled fonts. What am I missing? TIA!!!