Skip to content

Commit

Permalink
Coe improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Den4ik committed Aug 5, 2020
1 parent 7960d2e commit 394b7f0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
5 changes: 1 addition & 4 deletions Controller/Adminhtml/Messages/GetMessages.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,13 @@ private function getMessages(): array
MessageInterface::TYPE_SUCCESS => []
];

$items = $this->messageManager->getMessages()->getItems();
$items = $this->messageManager->getMessages(true)->getItems();
foreach ($items as $message) {
if (isset($messages[$message->getType()])) {
$messages[$message->getType()][] = $message->getText();
}
}

/* Clean message history */
$this->messageManager->getMessages(true);

return $messages;
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
"support": {
"email": "[email protected]"
},
"version": "1.0.3"
"version": "1.0.4"
}
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
-->

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Magenius_Core" setup_version="1.0.3"/>
<module name="Magenius_Core" setup_version="1.0.4"/>
</config>
6 changes: 2 additions & 4 deletions view/adminhtml/layout/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
~ See LICENSE.txt for license details.
-->

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="Magento\Backend\Block\Template" name="adminhtml.magenius_core.admin_message"
template="Magenius_Core::admin_message.phtml"/>
<block class="Magento\Backend\Block\Template" name="adminhtml.magenius_core.admin_message" template="Magenius_Core::admin_message.phtml"/>
</referenceContainer>
</body>
</page>

0 comments on commit 394b7f0

Please sign in to comment.