function drush_get_modules

8.0.x environment_7.inc drush_get_modules($include_hidden = TRUE)
8.0.x environment_6.inc drush_get_modules($include_hidden = TRUE)
8.0.x environment.inc drush_get_modules($include_hidden = TRUE)
6.x environment_6.inc drush_get_modules($include_hidden = TRUE)
6.x environment.inc drush_get_modules($include_hidden = TRUE)
6.x environment_7.inc drush_get_modules($include_hidden = TRUE)
7.x environment_7.inc drush_get_modules($include_hidden = TRUE)
7.x environment_6.inc drush_get_modules($include_hidden = TRUE)
7.x environment.inc drush_get_modules($include_hidden = TRUE)
3.x environment_7.inc drush_get_modules()
3.x environment_6.inc drush_get_modules()
3.x environment_5.inc drush_get_modules()
4.x environment_6.inc drush_get_modules()
4.x environment_5.inc drush_get_modules()
4.x environment.inc drush_get_modules()
5.x environment_6.inc drush_get_modules($include_hidden = TRUE)
5.x environment.inc drush_get_modules($include_hidden = TRUE)
master environment_7.inc drush_get_modules($include_hidden = TRUE)
master environment.inc drush_get_modules($include_hidden = TRUE)

Get complete information for all available modules.

Parameters

$include_hidden: Boolean to indicate whether hidden modules should be excluded or not.

Return value

An array containing module info for all available modules.

5 calls to drush_get_modules()
drush_get_extensions in includes/environment.inc
Get complete information for all available extensions (modules and themes).
drush_get_named_extensions_list in commands/core/drupal/environment.inc
Return a list of modules from a list of named modules. Both enabled and disabled/uninstalled modules are returned.
drush_system_modules_form_submit in commands/core/drupal/environment_6.inc
Submit the system modules form.
_core_path_aliases in commands/core/core.drush.inc
_drush_pm_uninstall in commands/core/drupal/pm.inc
Command callback. Uninstall one or more modules.
2 string references to 'drush_get_modules'
_drush_cache_clear_types in commands/core/drupal/cache_8.inc
_drush_cache_clear_types in commands/core/drupal/cache.inc

File

commands/core/drupal/environment_7.inc, line 18
Specific functions for a drupal 7 environment. drush_include_engine() magically includes either this file or environment_X.inc depending on which version of drupal drush is called from.

Code

function drush_get_modules($include_hidden = TRUE) {
  $modules = system_rebuild_module_data();
  if (!$include_hidden) {
    foreach ($modules as $key => $module) {
      if (isset($module->info['hidden'])) {
        unset($modules[$key]);
      }
    }
  }

  return $modules;
}