Last active
August 1, 2018 22:55
-
-
Save LucasCalazans/4dcf0075cad09fa573d75a0a200d5eb7 to your computer and use it in GitHub Desktop.
Simulate Magento messages, useful to front-enders.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Edit the follow file: vendor/magento/framework/App/Action/Action.php | |
public function __construct(Context $context) | |
{ | |
// ... // | |
$this->messageManager->addError(__('Error message.')); | |
$this->messageManager->addSuccessMessage(__('Success message.')); | |
$this->messageManager->addWarning(__('Warning message.')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment