在 Prestashop 中获取模块版本

Get module version in Prestashop

我的 Prestashop 上安装了一个模块,我想获取它的版本

如何在我的代码中执行此操作?

比方说我想得到 "v5.0.1"

感谢您的帮助!

模块文件中的版本设置如下:

public function __construct()
{
    $this->name = 'bienvenue';
    $this->version = '5.0.1';

    parent::__construct();

    /* Else code... */
}
$module = Module::getInstanceByName('bienvenue');
$version = $module->version;