/** * Get a list of all known modules */ public static function getAll($fresh = FALSE) { static $result; if ($fresh || !is_array($result)) { $result = array(); $ext = new CRM_Core_Extensions(); if ($ext->enabled) { $result = array_merge($result, $ext->getModules()); } $config = CRM_Core_Config::singleton(); if (is_callable(array($config->userSystem, 'getModules'))) { $result = array_merge($result, $config->userSystem->getModules()); } } return $result; }