I want to override the getErrorFlashMessage method in my action but getting the error message Class 'TYPO3\Flow\Error\Message' not found.
/**
* @return \TYPO3\Flow\Error\Message
*/
protected function getErrorFlashMessage() {
switch ($this->actionMethodName) {
case 'createAction' :
return new \TYPO3\Flow\Error\Message(\TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('tx_myext_domain_model_test.createError', 'myext' ));
default:
return parent::getErrorFlashMessage();
}
}
There is no such class in TYPO3 7.6.
Try
\TYPO3\CMS\Extbase\Error\Messageinstead.