cancel
Showing results for 
Search instead for 
Did you mean: 

Call the module version

SOLVED

Call the module version

Hello

 

I'm a french student and I'm actually trying to learn how to use Magento 2 i have a little difficulty to display the version of my module in my view could someone explain me briefly please.

2 REPLIES

Re: Call the module version

Hey @Antoine553

 

please check below code:- 

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$moduleInfo =  $objectManager->get('Magento\Framework\Module\ModuleList')->getOne('SR_Learning'); // SR_Learning is module name
echo "<pre>";
print_r($moduleInfo);

If works then mark as solution. 

Re: Call the module version

Thank you very much i tried it earlier and it didn't work but i found out i made an error in a name thanks