trait AddFlashMessageTrait (View source)

A trait to add backend translation based on the backend users settings

Properties

protected Translator $_translator

Methods

void
addFlashMessage(string $messageBody, string $messageTitle = '', string $severity = Message::SEVERITY_OK, array $messageArguments = [], int $messageCode = null)

Add a translated flashMessage.

Details

void addFlashMessage(string $messageBody, string $messageTitle = '', string $severity = Message::SEVERITY_OK, array $messageArguments = [], int $messageCode = null)

Add a translated flashMessage.

Parameters

string $messageBody

The translation id for the message body.

string $messageTitle

The translation id for the message title.

string $severity
array $messageArguments
int $messageCode

Return Value

void