- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2017
02:12 AM
06-30-2017
02:12 AM
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.
Solved! Go to Solution.
Labels:
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2017
02:24 AM
06-30-2017
02:24 AM
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
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2017
02:24 AM
06-30-2017
02:24 AM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2017
02:50 AM
06-30-2017
02:50 AM
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