cancel
Showing results for 
Search instead for 
Did you mean: 

Call the module version

SOLVED
   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

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.

1 ACCEPTED SOLUTION

Accepted Solutions

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. 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

View solution in original post

2 REPLIES 2

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. 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

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