You are here

function system_service_module_exists in Services 7

Same name and namespace in other branches
  1. 5 services/system_service/system_service.module \system_service_module_exists()
  2. 6 services/system_service/system_service.inc \system_service_module_exists()
  3. 6.2 services/system_service/system_service.inc \system_service_module_exists()

Check if a module is enabled. If so, return its version.

1 string reference to 'system_service_module_exists'
system_service_service in services/system_service/system_service.module
Implementation of hook_service().

File

services/system_service/system_service.inc, line 64
@author Services Dev Team

Code

function system_service_module_exists($module) {
  if (module_exists($module)) {
    $modules = module_rebuild_cache();
    if (array_key_exists($module, $modules)) {
      return (string) $modules[$module]->info['version'];
    }
  }
  return "";
}