[TYPO3-dev] Re: Flash message called from DataHandler, error

Gernot Schulmeister gernotschulmeister at gmx.at
Sat Oct 11 10:41:04 CEST 2014


Hello Olle,

in Hooks or Userfunctions to modify TCA I use flashmessages like this:

$this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
$this->controllerContext       = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext');
$this->controllerContext->getFlashMessageQueue()->addMessage(new FlashMessage($message, $title, FlashMessage::ERROR, TRUE));

the Flashmessage Class is known because of a use definition 

use TYPO3\CMS\Core\Messaging\FlashMessage;

best regards

Gernot



More information about the TYPO3-dev mailing list