Get module dir

@param string $sModuleId Module ID

@return string
493476
public function getModulePath($sModuleId = null)
    {
        if (!$sModuleId) {
            $sModuleId = $this->getId();
        }

        $aModulePaths = $this->getModulePaths();
        $sModulePath = (isset($aModulePaths[$sModuleId])) ? $aModulePaths[$sModuleId] : '';

        // if still no module dir, try using module ID as dir name
        if (!$sModulePath && is_dir(\OxidEsales\Eshop\Core\Registry::getConfig()->getModulesDir() . $sModuleId)) {
            $sModulePath = $sModuleId;
        }

        return $sModulePath;
    }
284658
public static function getConfig(string $moduleId = null)
	{
		if (is_null(self::$configModule)){
			$root = Main\Application::getDocumentRoot();
			$folder = ['/local', '/bitrix'];
			$config = null;
			foreach ($folder as $item) {
				$fileMainConfig = $root.$item.'/modules/'.$moduleId.'/config/'.$moduleId.'.yaml';
				if (file_exists($fileMainConfig)){
					try {
						$config = Yaml::parseFile($fileMainConfig);
					} catch (ParseException $e) {
						throw new AdminExceptions\ConfigurationModule($e->getMessage(), $e->getCode());
					}
					break;
				}
			}

			if (is_null($config) || count($config) == 0){
				throw new AdminExceptions\ConfigurationModule('Configuration file not found or empty');
			}

			self::$configModule = $config;
		}

		return self::$configModule;
	}
49968
public function getModule()
    {
        $module = request()->segment(1);

        $defaultModules = config('cms.active-core-modules');
        $extraModules = array_keys(config('cms.modules', []));

        $modules = array_merge($defaultModules, $extraModules);

        if (in_array($module, $modules)) {
            return str_singular($module);
        }

        return 'page';
    }
636276
protected function _deleteModule($sModuleId)
    {
        $aExt = \OxidEsales\Eshop\Core\Registry::getConfig()->getModulesWithExtendedClass();

        $aUpdatedExt = $this->diffModuleArrays($aExt, $sModuleId);
        $aUpdatedExt = $this->buildModuleChains($aUpdatedExt);

        \OxidEsales\Eshop\Core\Registry::getConfig()->saveShopConfVar('aarr', 'aModules', $aUpdatedExt);
    }
1306765
protected function _deleteBlock($sModuleId)
    {
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sShopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();
        $oDb->execute("DELETE FROM `oxtplblocks` WHERE `oxmodule` =" . $oDb->quote($sModuleId) . " AND `oxshopid` = " . $oDb->quote($sShopId));
    }
382508
protected function getListModule()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            $list = $this->module->getList();
            $this->limitArray($list);
            return $list;
        }

        $module = $this->module->get($id);

        if (empty($module)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($module);

    }
911294
function getModulePath(sModuleName, sSuffix){
		return sap.ui.require.toUrl(sModuleName.replace(/\./g, "/") + sSuffix);
	}
724766
public function extractModulePaths()
    {
        $aModules = $this->getModulesWithExtendedClass();
        $aModulePaths = [];

        if (is_array($aModules) && count($aModules) > 0) {
            foreach ($aModules as $aModuleClasses) {
                foreach ($aModuleClasses as $sModule) {
                    $sModuleId = substr($sModule, 0, strpos($sModule, "/"));
                    $aModulePaths[$sModuleId] = $sModuleId;
                }
            }
        }

        return $aModulePaths;
    }
660702
protected function _deleteModuleEvents($sModuleId)
    {
        $aEvents = (array) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aModuleEvents');
        unset($aEvents[$sModuleId]);

        $this->_saveToConfig('aModuleEvents', $aEvents);
    }
1021355
public function getModulePath(): string
    {
        $reflector = new ReflectionClass(get_class($this));
        $fn = $reflector->getFileName();
        $directory = dirname($fn);
        return $directory;
    }
1078516
private function getFolderById(int $folderId): \stdClass
    {
        $folder = Craft::$app->assets->getFolderById($folderId);
        if ($folder) {
            $volume = $folder->getVolume();
            return  (object) [
                'id' => $folderId,
                'handle' => $volume->handle
            ];
        }
        return null;
    }
1264592
protected static function _getModuleInstaller(oxModuleCache $oModuleCache)
    {
        if (self::$_oModuleInstaller === null) {
            self::$_oModuleInstaller = oxNew('oxModuleInstaller', $oModuleCache);
        }

        return self::$_oModuleInstaller;
    }
100887
public function GetLink($sMode = '', $aAdditionalParameter = array())
    {
        if (!empty($sMode)) {
            $aAdditionalParameter[MTPkgShopWishlistCore::URL_MODE_PARAMETER_NAME] = $sMode;
        }
        $oShopConfig = TdbShop::GetInstance();

        return $oShopConfig->GetLinkToSystemPage('wishlist', $aAdditionalParameter, true);
    }
349261
private function _getModuleIdsFromExtensions($aData)
    {
        $aModuleIds = [];
        $oModule = $this->getModule();
        foreach ($aData as $aModule) {
            foreach ($aModule as $sFilePath) {
                $sModuleId = $oModule->getIdByPath($sFilePath);
                $aModuleIds[] = $sModuleId;
            }
        }

        return $aModuleIds;
    }
403599
public function getModulesMap()
    {
        if ($this->_modulesMap === null) {
            $this->_modulesMap = NavItemModule::find()->select(['module_name', 'id'])->indexBy('id')->asArray()->all();
        }
        
        return $this->_modulesMap;
    }
1160863
public function getTemplates($sModuleId = null)
    {
        if (is_null($sModuleId)) {
            $sModuleId = $this->getId();
        }

        if (!$sModuleId) {
            return [];
        }

        $sShopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();

        return \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->getCol("SELECT oxtemplate FROM oxtplblocks WHERE oxmodule = '$sModuleId' AND oxshopid = '$sShopId'");
    }
250380
protected function _deleteTemplateFiles($sModuleId)
    {
        $aTemplates = (array) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aModuleTemplates');
        unset($aTemplates[$sModuleId]);

        $this->_saveToConfig('aModuleTemplates', $aTemplates);
    }