@param string|ModuleInterface $module

@return bool
169126
public function hasModule($module)
    {
        return $module instanceof ModuleInterface
            ? in_array($module, $this->modules)
            : isset($this->modules[$module]);
    }
327485
public function removeAllByModule($module)
    {
        $this->initializeOnDemand();

        if ($this->arrayConfig->hasModule($module) && $this->configMapper->deleteAllByModule($module)) {
            $this->arrayConfig->removeAllByModule($module);
            return true;
        } else {
            return false;
        }
    }
1211619
public function isEnabled($modulePath)
    {
        $modulePathSegments = explode('/', $modulePath);
        $moduleConfiguration = Arrays::getValueByPath($this->modules, implode('.submodules.', $modulePathSegments));

        if (isset($moduleConfiguration['enabled']) && $moduleConfiguration['enabled'] !== true) {
            return false;
        }

        array_pop($modulePathSegments);

        if ($modulePathSegments === []) {
            return true;
        }

        return $this->isEnabled(implode('/', $modulePathSegments));
    }
71397
public function module($module = null)
    {
        if (!is_null($module)) {
            $this->module = $module;
            return $this;
        } else {
            return $this->module ?: '';
        }
    }
749206
public function getPath($module)
    {
        foreach ($this->resolvers as $resolver) {
            $path = $resolver->getPath($module);
            if ($path !==false) {
                return $path;
            }
        }

        return false;
    }
607624
public static function get($module) {
		if(self::$modules === array())
			self::initialize();

		if(!isset(self::$modules[$module]))
			return false;

		return self::$modules[$module];
	}
85986
public static function exists($module)
	{
		if (array_key_exists($module, static::$modules))
		{
			return static::$modules[$module];
		}
		else
		{
			$paths = \Config::get('module_paths', array());

			foreach ($paths as $path)
			{
				if (is_dir($path.$module))
				{
					return $path.$module.DS;
				}
			}
		}

		return false;
	}
98437
public static function loadScriptingModule($module)
    {
        $fullScriptPath = false;

        //  Remove any quotes from this passed in module
        $module = trim(str_replace(["'", '"'], null, $module), ' /');

        //  Check the configured script paths
        if (null === ($script = array_get(static::$libraries, $module))) {
            $script = $module;
        }

        foreach (static::$libraryPaths as $key => $path) {
            $checkScriptPath = $path . DIRECTORY_SEPARATOR . $script;

            if (is_file($checkScriptPath) && is_readable($checkScriptPath)) {
                $fullScriptPath = $checkScriptPath;
                break;
            }
        }

        if (!$script || !$fullScriptPath) {
            throw new InternalServerErrorException(
                'The module "' . $module . '" could not be found in any known locations.'
            );
        }

        return file_get_contents($fullScriptPath);
    }
1330158
public function storeModule($module, array $vars)
    {
        foreach ($vars as $key => $value) {
            if (!$this->store($module, $key, $value)) {
                return false;
            }
        }

        return true;
    }
68163
public function isAllowed($modulePath)
    {
        $modulePathSegments = explode('/', $modulePath);
        $moduleConfiguration = Arrays::getValueByPath($this->modules, implode('.submodules.', $modulePathSegments));

        if (!$this->privilegeManager->isGranted(ModulePrivilege::class, new ModulePrivilegeSubject($modulePath))) {
            return false;
        }

        // @deprecated since Neos 3.2, use the ModulePrivilegeTarget instead!
        if (isset($moduleConfiguration['privilegeTarget']) && !$this->privilegeManager->isPrivilegeTargetGranted($moduleConfiguration['privilegeTarget'])) {
            return false;
        }

        return true;
    }
289926
public function isCoreModule($module)
    {
        if (!is_string($module)) {
            throw new InvalidArgumentException(sprintf(
                'Module name must be a string, not "%s"', gettype($module)
            ));
        }

        return in_array($module, $this->coreModules);
    }
533471
public function appliesToContext(ContextInterface $context): bool
    {
        if (!$context instanceof PropertyContext) {
            return false;
        }

        $property = $context->getProperty();
        if (!preg_match($this->regex, $property->getName())) {
            return false;
        }

        return $this->subRule->appliesToContext($context);
    }
813233
public function hasModule($module)
    {
        foreach ($this->data as $index => $row) {
            if ($row[ConstProviderInterface::CONFIG_PARAM_MODULE] == $module) {
                return true;
            }
        }

        return false;
    }
252349
public function validate(\OxidEsales\Eshop\Core\Module\Module $module)
    {
        return file_exists($module->getMetadataPath());
    }
1126535
private function getSubmodules(ModuleInterface $module)
    {
        if ($module instanceof SubmoduleInterface) {
            $module = $this->getModule($module->getParentIdentifier());
        }

        return $this->get('clastic.module_manager')
            ->getSubmodules($module->getIdentifier());
    }
44667
public function update($module, $options = null)
    {
        $module = strtolower($module);
        $options = is_null($options) ? array() : $options;
        $modules = $this->findModules();
       
        // Resolve deps
        $deps = $this->resolveDependencies(
            $module
        );
        
        if (!$deps->offsetExists($module)) {
            $deps->offsetSet($module, 'X');
        }
        
        // Setup all dependencies
        foreach($deps as $depModule => $depVersion){

            if(!$this->hasSetupService($depModule)){
                continue;
            }
        
            $setup = $this->initSetupService($depModule);
            $operation = 'setup';
            $args = array();
        
            if ($depModule == $module) {
                $args['options'] = $options;
            }
             
            // complete existing installation
            $setup->exec(
                'setup',
                $args
            );
        }
        
        return true;
    }
481461
public function removeFromCacheDir($module)
    {
        // Create a path
        $path = $this->appConfig->getModuleCacheDir($module);
        return $this->performRemoval($path);
    }