コード例 #1
0
 public function getReleaseVersion($module)
 {
     $modulePath = $this->moduleRegistry->getPath(self::XML_PATH_INSTALLATED_MODULES, $module);
     $filePath = str_replace(['\\', '/'], DIRECTORY_SEPARATOR, "{$modulePath}/etc/module.xml");
     $source = new \Magento\Framework\Simplexml\Config($filePath);
     if ($source->getNode(self::XML_PATH_INSTALLATED_MODULES)->attributes()->release_version) {
         return $source->getNode(self::XML_PATH_INSTALLATED_MODULES)->attributes()->release_version->__toString();
     }
     return false;
 }