We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 45074486 authored by rikterbeek's avatar rikterbeek

#17 show the version based on setup_version

parent 6beba36c
......@@ -28,10 +28,24 @@ namespace Adyen\Payment\Block\Adminhtml\System\Config\Field;
class Version extends \Magento\Config\Block\System\Config\Form\Field
{
/**
* @var \Magento\Framework\Module\ModuleListInterface
*/
protected $_moduleList;
public function __construct(
\Magento\Framework\Module\ModuleListInterface $moduleList,
\Magento\Backend\Block\Template\Context $context,
array $data = []
)
{
parent::__construct($context, $data);
$this->_moduleList = $moduleList;
}
protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
{
// make this dynamic
//$configVer = $this->moduleList->getOne($moduleName)['setup_version'];
return (string) "0.1.0";
return (string) $this->_moduleList->getOne("Adyen_Payment")['setup_version'];
}
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment