function drush_get_extensions

8.0.x environment.inc drush_get_extensions($include_hidden = TRUE)
6.x environment.inc drush_get_extensions($include_hidden = TRUE)
7.x environment.inc drush_get_extensions($include_hidden = TRUE)
4.x environment.inc drush_get_extensions()
5.x environment.inc drush_get_extensions($include_hidden = TRUE)
master environment.inc drush_get_extensions($include_hidden = TRUE)

Get complete information for all available extensions (modules and themes).

Return value

An array containing info for all available extensions. In D8, these are Extension objects.

12 calls to drush_get_extensions()
drush_get_projects in commands/pm/pm.drush.inc
Obtain an array of installed projects off the extensions available.
drush_make_generate in commands/make/generate.make.inc
Drush callback; generate makefile from the current build.
drush_pm_enable_validate in commands/pm/pm.drush.inc
Validate callback. Determine the modules and themes that the user would like enabled.
drush_pm_info in commands/pm/info.pm.inc
Command callback. Show detailed info for one or more extensions.
drush_pm_list in commands/pm/pm.drush.inc
Command callback. Show a list of extensions with type and status.

... See full list

File

includes/environment.inc, line 716
Functions used by drush to query the environment and setting the current configuration.

Code

function drush_get_extensions($include_hidden = TRUE) {
  drush_include_engine('drupal', 'environment');
  $extensions = array_merge(drush_get_modules($include_hidden), drush_get_themes($include_hidden));
  foreach ($extensions as $name => $extension) {
    if (isset($extension->info['name'])) {
      $extensions[$name]->label = $extension->info['name'] . ' (' . $name . ')';
    }
    else {
      drush_log(dt("Extension !name provides no human-readable name in .info file.", array('!name' => $name), LogLevel::DEBUG));
      $extensions[$name]->label = $name . ' (' . $name . ')';
    }
    if (empty($extension->info['package'])) {
      $extensions[$name]->info['package'] = dt('Other');
    }
  }
  return $extensions;
}