app/Services/ModuleService.php
public function findByName(string $module_name, bool $include_disabled = false): ?ModuleInterface
    {
        return $this->all($include_disabled)
            ->first(static function (ModuleInterface $module) use ($module_name): bool {
                return $module->name() === $module_name;
            });
    }
public function findByName(string $module_name, bool $include_disabled = false): ?ModuleInterface
    {
        return $this->all($include_disabled)
            ->first(static function (ModuleInterface $module) use ($module_name): bool {
                return $module->name() === $module_name;
            });
    }
public function findByName ( string $ module_name , bool $ include_disabled = false ) : ? ModuleInterface { return $ this -> all ( $ include_disabled ) -> first ( static function ( ModuleInterface $ module ) use ( $ module_name ) : bool { return $ module -> name ( ) === $ module_name ; } ) ; }
Find a specified module, if it is currently active.

@param string $module_name
@param bool   $include_disabled

@return ModuleInterface|null
Find a specified module if it is currently active .