protected function filterExtensionsByModule($modules, $module)
    {
        if ($this->isMetadataVersionGreaterEqual($module, '2.0')) {
            $moduleHelper = Registry::get(ModuleHelper::class);
            $moduleHelper->setModule($module);
            $path = $moduleHelper->getModuleNameSpace();
        } else {

            $modulePaths = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aModulePaths');

            $moduleId = $module->getId();
            $path = '';
            if (isset($modulePaths[$moduleId])) {
                $path = $modulePaths[$moduleId] . '/';
            }

            if (!$path) {
                $path = $moduleId . "/";
            }
        }
        $filteredModules = [];

        if (!$path) {
            return $filteredModules;
        }

       foreach ($modules as $class => $extend) {
            foreach ($extend as $extendPath) {
                if (strpos($extendPath, $path) === 0) {
                    $filteredModules[$class][] = $extendPath;
                }
            }
        }

        return $filteredModules;
    }
protected function filterExtensionsByModule($modules, $module)
    {
        if ($this->isMetadataVersionGreaterEqual($module, '2.0')) {
            $moduleHelper = Registry::get(ModuleHelper::class);
            $moduleHelper->setModule($module);
            $path = $moduleHelper->getModuleNameSpace();
        } else {

            $modulePaths = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aModulePaths');

            $moduleId = $module->getId();
            $path = '';
            if (isset($modulePaths[$moduleId])) {
                $path = $modulePaths[$moduleId] . '/';
            }

            if (!$path) {
                $path = $moduleId . "/";
            }
        }
        $filteredModules = [];

        if (!$path) {
            return $filteredModules;
        }

       foreach ($modules as $class => $extend) {
            foreach ($extend as $extendPath) {
                if (strpos($extendPath, $path) === 0) {
                    $filteredModules[$class][] = $extendPath;
                }
            }
        }

        return $filteredModules;
    }
protected function filterExtensionsByModule ( $ modules , $ module ) { if ( $ this -> isMetadataVersionGreaterEqual ( $ module , '2.0' ) ) { $ moduleHelper = Registry :: get ( ModuleHelper :: class ) ; $ moduleHelper -> setModule ( $ module ) ; $ path = $ moduleHelper -> getModuleNameSpace ( ) ; } else { $ modulePaths = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'aModulePaths' ) ; $ moduleId = $ module -> getId ( ) ; $ path = '' ; if ( isset ( $ modulePaths [ $ moduleId ] ) ) { $ path = $ modulePaths [ $ moduleId ] . '/' ; } if ( ! $ path ) { $ path = $ moduleId . "/" ; } } $ filteredModules = [ ] ; if ( ! $ path ) { return $ filteredModules ; } foreach ( $ modules as $ class => $ extend ) { foreach ( $ extend as $ extendPath ) { if ( strpos ( $ extendPath , $ path ) === 0 ) { $ filteredModules [ $ class ] [ ] = $ extendPath ; } } } return $ filteredModules ; }
Returns extensions list by module id.

@param array  $modules  Module array (nested format)
@param string $module Module id/folder name

@return array
Returns extensions list by module id .