Skip to content

Commit

Permalink
Get module version by element id
Browse files Browse the repository at this point in the history
  • Loading branch information
srenon committed Dec 25, 2020
1 parent 231c17b commit 79b5efe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Block/Adminhtml/System/Config/Composer/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public function render(AbstractElement $element)
*/
protected function _getElementHtml(AbstractElement $element)
{
return 'v' . $this->module->getInstalledVersion($this->getModuleName());
$isElementIdModuleName = (strpos($element->getOriginalData('id'), 'MagePal_') === 0);
$moduleName = $isElementIdModuleName ? $element->getOriginalData('id') : $this->getModuleName();

return 'v' . $this->module->getInstalledVersion($moduleName);
}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
}
],
"require": {
"magento/framework": "100.0.*|100.1.*|101.0.*|102.0.*|103.0.*"
"magento/framework": "*"
},
"type": "magento2-module",
"version": "1.1.8",
"version": "1.1.9",
"autoload": {
"files": [
"registration.php"
Expand Down

0 comments on commit 79b5efe

Please sign in to comment.