The getSystemMessages hook allows to add additional messages to the back end
home screen. It does not pass any parameters and expects a string as return value.
Return Values
Return a string with the message(s) you want to add to the home screen (including
HTML markup) or an empty string.
Example
// src/EventListener/GetSystemMessagesListener.php
namespaceApp\EventListener;useContao\CoreBundle\DependencyInjection\Attribute\AsHook;#[AsHook('getSystemMessages')]
classGetSystemMessagesListener{publicfunction__invoke():string{// Display a warning if the system admin's email is not set
if(empty($GLOBALS['TL_ADMIN_EMAIL'])){return'<p class="tl_error">Please add your email address to system settings.</p>';}return'';}}