{"id":20961843,"url":"https://github.com/heimrichhannot/contao-alert-reminder-bundle","last_synced_at":"2026-04-28T10:01:21.057Z","repository":{"id":62515427,"uuid":"285276670","full_name":"heimrichhannot/contao-alert-reminder-bundle","owner":"heimrichhannot","description":"This utility bundle offers functionality to remind the backend users of existing alerts in the Contao CMS.","archived":false,"fork":false,"pushed_at":"2023-09-13T11:35:48.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-03-13T04:56:38.304Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heimrichhannot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-05T12:07:07.000Z","updated_at":"2022-09-28T06:23:57.000Z","dependencies_parsed_at":"2025-01-20T00:51:23.968Z","dependency_job_id":"c0a6f0ce-98e2-4340-ad53-4a6aa2fbc88f","html_url":"https://github.com/heimrichhannot/contao-alert-reminder-bundle","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/heimrichhannot/contao-alert-reminder-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-alert-reminder-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-alert-reminder-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-alert-reminder-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-alert-reminder-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heimrichhannot","download_url":"https://codeload.github.com/heimrichhannot/contao-alert-reminder-bundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-alert-reminder-bundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32375625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T09:24:15.638Z","status":"ssl_error","status_checked_at":"2026-04-28T09:24:15.071Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T02:17:52.981Z","updated_at":"2026-04-28T10:01:21.040Z","avatar_url":"https://github.com/heimrichhannot.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Contao Alert Reminder Bundle\n\nThis utility bundle offers functionality to remind the backend users of existing alerts in the Contao CMS.\n\n## Features\n\n- looks for existing (configurable) contao backend alerts (added via the hook `getSystemMessages`) and adds a backend message in order to remind the backend user of it\n\n## Use case\n\nYou might ask what's the use case of this functionality?\n\nThe original use case was in order to remind the backend users to add missing `alt` attributes to images (accessibility).\n\nWithout the functionality, the user might forget about it. Making the `alt` mandatory has also not been an option because of contao's simple file upload functionality which doesn't contain the field at all.\n\nHence the need for reminding the backend user of it.\n\n## Installation\n\n1. Run `composer require heimrichhannot/contao-alert-reminder-bundle` and update the database.\n\n## Technical instructions\n\n### Add new contao alerts to the context of this bundle\n\n1. Register a `getSystemMessages` hook as usual in contao:\n   \n   ```php\n   // config.php (or use yaml tags in contao 4.9+)\n   $GLOBALS['TL_HOOKS']['getSystemMessages']['myBundle'] = [\n       \\Acme\\MyBundle\\EventListener\\GetSystemMessagesListener::class, '__invoke'\n   ];\n   ```\n   \n   ```php\n   // GetSystemMessagesListener.php\n   \n   namespace Acme\\MyBundle\\EventListener;\n   \n   use Acme\\AlertReminderBundle\\Manager\\AlertReminderManager;\n   use Acme\\RequestBundle\\Component\\HttpFoundation\\Request;\n   use Symfony\\Contracts\\Translation\\TranslatorInterface;\n   \n   class GetSystemMessagesListener\n   {\n       /**\n        * @var TranslatorInterface\n        */\n       private $translator;\n       /**\n        * @var Request\n        */\n       private $request;\n       /**\n        * @var AlertReminderManager\n        */\n       private $alertReminderManager;\n   \n       public function __construct(AlertReminderManager $alertReminderManager, TranslatorInterface $translator, Request $request)\n       {\n           $this-\u003etranslator           = $translator;\n           $this-\u003erequest              = $request;\n           $this-\u003ealertReminderManager = $alertReminderManager;\n       }\n   \n       public function __invoke()\n       {\n           $message = '\u003cp class=\"tl_error\"\u003eMy alert message\u003c/p\u003e';\n   \n           return $this-\u003ealertReminderManager-\u003eprepareSystemMessage($message, 'some_alert_type_alias');\n       }\n   }\n   ```\n1. In order to activate the reminding you have to add your alert type in your project's `app/config/config.yml`:\n\n   ```yaml\n   huh_alert_reminder:\n     alert_types:\n       - { name: some_alert_type_alias }\n   ```\n\n### Add your alerts to the alert queue backend module\n\nThis bundle introduces the `AlertQueueModule`. It's just a list of messages. You might use it to add the full list of\nalerts you want to the user to notice. In the context of reminding the user of missing alt-attributes this is the place\nto add shortcuts to the concrete media files.\n\nYou can add your messages by registering an event listener for the event `AddAlertsToAlertReminderQueueEvent` for example as follows:\n\n```php\npublic function __invoke(AddAlertsToAlertReminderQueueEvent $event)\n{\n    if ('alt_issues_existing' !== Input::get('type')) {\n        return;\n    }\n\n    $messages = $event-\u003egetAlerts();\n\n    $messages[] = [\n        'class' =\u003e 'tl_error', // you can use Contao's tl_ classes\n        'message' =\u003e 'My message'\n    ];\n\n    $event-\u003esetAlerts($messages);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheimrichhannot%2Fcontao-alert-reminder-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheimrichhannot%2Fcontao-alert-reminder-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheimrichhannot%2Fcontao-alert-reminder-bundle/lists"}