source/Core/Module/Module.php
public function getModuleIdByClassName($className)
    {
        if (!\OxidEsales\Eshop\Core\NamespaceInformationProvider::isNamespacedClass($className)) {
            return $this->backwardsCompatibleGetModuleIdByClassName($className);
        }

        $moduleId = '';
        $extensions = (array) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aModuleExtensions');
        foreach ($extensions as $id => $moduleClasses) {
            if (in_array($className, $moduleClasses)) {
                $moduleId = $id;
                break;
            }
        }

        return $moduleId;
    }
public function getModuleIdByClassName($className)
    {
        if (!\OxidEsales\Eshop\Core\NamespaceInformationProvider::isNamespacedClass($className)) {
            return $this->backwardsCompatibleGetModuleIdByClassName($className);
        }

        $moduleId = '';
        $extensions = (array) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aModuleExtensions');
        foreach ($extensions as $id => $moduleClasses) {
            if (in_array($className, $moduleClasses)) {
                $moduleId = $id;
                break;
            }
        }

        return $moduleId;
    }
public function getModuleIdByClassName ( $ className ) { if ( ! \ OxidEsales \ Eshop \ Core \ NamespaceInformationProvider :: isNamespacedClass ( $ className ) ) { return $ this -> backwardsCompatibleGetModuleIdByClassName ( $ className ) ; } $ moduleId = '' ; $ extensions = ( array ) \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'aModuleExtensions' ) ; foreach ( $ extensions as $ id => $ moduleClasses ) { if ( in_array ( $ className , $ moduleClasses ) ) { $ moduleId = $ id ; break ; } } return $ moduleId ; }
Get the module id for a given class name. If there are duplicates, the first module id will be returned.

@param string $className

@return string
Get the module id for a given class name . If there are duplicates the first module id will be returned .