MessageService
class MessageService (View source)
Queues per-page flash messages in the session and renders the bare-HTML fatal error page.
Constants
| private TYPE_ERROR |
|
Methods
Add a message to be displayed for a specific script Prevents duplicate messages from being added
Get messages for a specific script and clear them from session
Add a system error message that will be displayed in the proper place in the HTML
Display a system error directly with basic HTML Useful for critical errors before the header/footer can be rendered
Details
__construct(UserContextService $userContextService)
No description
void
addMessage(string $script, string $type, string $content, string|null $recordName = null)
Add a message to be displayed for a specific script Prevents duplicate messages from being added
array|null
getMessages(string $script)
Get messages for a specific script and clear them from session
void
addSystemError(string $error, string|null $recordName = null)
Add a system error message that will be displayed in the proper place in the HTML
void
displayDirectSystemError(string $error, bool $exit = true)
Display a system error directly with basic HTML Useful for critical errors before the header/footer can be rendered