We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday 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; ...@@ -28,10 +28,24 @@ namespace Adyen\Payment\Block\Adminhtml\System\Config\Field;
class Version extends \Magento\Config\Block\System\Config\Form\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) protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
{ {
// make this dynamic return (string) $this->_moduleList->getOne("Adyen_Payment")['setup_version'];
//$configVer = $this->moduleList->getOne($moduleName)['setup_version'];
return (string) "0.1.0";
} }
} }
\ 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