Skip to content

Instantly share code, notes, and snippets.

@pumatertion
Created August 1, 2013 14:42
Show Gist options
  • Save pumatertion/6132051 to your computer and use it in GitHub Desktop.
Save pumatertion/6132051 to your computer and use it in GitHub Desktop.
isnt it better to order the arguments of addFlashMessage like message itself accepts them.
\TYPO3\Flow\Error\Notice($messageBody, $messageCode, $messageArguments, $messageTitle)
in most cases i just need $messageBody and $messageCode. severity can be dafault. but i have to put the argument for severity just to be able to add a $messageCode.
$this->addFlashMessage('Done',123423423);
this is coded faster if you want to translate messages by id in rendering instead of:
$this->addFlashMessage('Done', '', Message::SEVERITY_OK, array(), 123423423)
also a use statement is needed for this if you dont want to use fqn.
so reorderd addFlashMessage could be like this:
addFlashMessage($messageBody, $messageCode = NULL, array $messageArguments = array(), $messageTitle = '' $severity = Message::SEVERITY_OK)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment