CodeExplorer flashMessageTypeFromImportance example
public function notify(Notification
$notification, RecipientInterface
$recipient, string
$transportName = null
): void
{ if (null ===
$request =
$this->stack->
getCurrentRequest()) { return;
} $message =
$notification->
getSubject();
if ($notification->
getEmoji()) { $message =
$notification->
getEmoji().' '.
$message;
} $request->
getSession()->
getFlashBag()->
add($this->mapper->
flashMessageTypeFromImportance($notification->
getImportance()),
$message);
} public function supports(Notification
$notification, RecipientInterface
$recipient): bool
{ return true;
}}