{"id":13518731,"url":"https://github.com/markshust/magento2-module-messages","last_synced_at":"2026-01-11T16:02:17.050Z","repository":{"id":56967083,"uuid":"156442316","full_name":"markshust/magento2-module-messages","owner":"markshust","description":"The Messages module allows you to send success, notice, warning and error messages with HTML.","archived":false,"fork":false,"pushed_at":"2020-08-13T07:44:35.000Z","size":81,"stargazers_count":57,"open_issues_count":1,"forks_count":17,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T13:48:37.038Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markshust.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"markshust"}},"created_at":"2018-11-06T20:19:36.000Z","updated_at":"2025-03-15T13:58:44.000Z","dependencies_parsed_at":"2022-08-21T09:50:41.212Z","dependency_job_id":null,"html_url":"https://github.com/markshust/magento2-module-messages","commit_stats":null,"previous_names":["devtomic/magento2-module-messages"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/markshust/magento2-module-messages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markshust%2Fmagento2-module-messages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markshust%2Fmagento2-module-messages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markshust%2Fmagento2-module-messages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markshust%2Fmagento2-module-messages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markshust","download_url":"https://codeload.github.com/markshust/magento2-module-messages/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markshust%2Fmagento2-module-messages/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28312154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: 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-08-01T05:01:48.285Z","updated_at":"2026-01-11T16:02:17.033Z","avatar_url":"https://github.com/markshust.png","language":"PHP","funding_links":["https://github.com/sponsors/markshust"],"categories":["PHP"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eMarkShust_Messages\u003c/h1\u003e \n\n\u003cdiv align=\"center\"\u003e\n  \u003cp\u003eSend success, notice, warning and error messages with \u003ccode\u003e\u0026lt;html\u0026gt;\u003c/code\u003e\u003c/p\u003e\n  \n  \u003cimg src=\"https://img.shields.io/badge/magento-2.2%20|%202.3-brightgreen.svg?logo=magento\u0026longCache=true\u0026style=flat-square\" alt=\"Supported Magento Versions\" /\u003e\n  \u003ca href=\"https://packagist.org/packages/markshust/magento2-module-messages\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/markshust/magento2-module-messages.svg?style=flat-square\" alt=\"Latest Stable Version\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://packagist.org/packages/markshust/magento2-module-messages\" target=\"_blank\"\u003e\u003cimg src=\"https://poser.pugx.org/markshust/magento2-module-messages/downloads\" alt=\"Composer Downloads\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/maintained%3F-yes-brightgreen.svg?style=flat-square\" alt=\"Maintained - Yes\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" /\u003e\u003c/a\u003e\n\n\u003c/div\u003e\n\n## Table of contents\n\n- [Summary](#summary)\n- [Installation](#installation)\n- [API](#api)\n- [Usage](#usage)\n- [License](#license)\n\n## Summary\n\nBy default, when you call `$this-\u003emessageManager-\u003eaddSuccessMessage` within Magento, you cannot pass custom HTML into your message. This doesn't provide you with the flexibility to provide customized messages to your visitors.\n\nThis module provides the ability to display custom messages including HTML, and still escapes the HTML to prevent cross-site scripting (XSS) attacks.\n\n## Installation\n\n```\ncomposer require markshust/magento2-module-messages\nbin/magento module:enable MarkShust_Messages\nbin/magento setup:upgrade\n```\n\n## API\n\n```php\n/**\n * Any of the built-in complex message functions can be called with this identifer:\n *     addComplexSuccessMessage\n *     addComplexNoticeMessage\n *     addComplexWarningMessage\n *     addComplexErrorMessage\n * \n * @param string $identifer Set to 'withHtml' to use this module.\n * @param mixed[] $data Data containing elements.\n *     @type string 'html' Desired output including HTML.\n *     @type string[] 'allowed_tags' (optional) List of allowed tags to render as HTML.\n */\n$this-\u003emessageManager-\u003eaddComplexSuccessMessage($identifer, $data);\n```\n\n## Usage\n\n```php\nprotected messageManager;\n \npublic function __construct(\n    ... \n    \\Magento\\Framework\\Message\\ManagerInterface $messageManager,\n    ...\n) {\n    $this-\u003emessageManager = $messageManager;\n    ...\n}\n\n$this-\u003emessageManager-\u003eaddComplexSuccessMessage('withHtml', [\n    'html' =\u003e '\u003cb\u003eThis is bold text!\u003c/b\u003e And this is not.',\n    'allowed_tags' =\u003e ['b'],\n]);\n```\n\n![Screenshot](https://raw.githubusercontent.com/markshust/magento2-module-messages/master/docs/demo.png)\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkshust%2Fmagento2-module-messages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkshust%2Fmagento2-module-messages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkshust%2Fmagento2-module-messages/lists"}