function drush_get_extension_status

8.0.x pm.drush.inc drush_get_extension_status($extension)
6.x pm.drush.inc drush_get_extension_status($extension)
7.x pm.drush.inc drush_get_extension_status($extension)
4.x pm.drush.inc drush_get_extension_status($extension)
5.x pm.drush.inc drush_get_extension_status($extension)
master pm.drush.inc drush_get_extension_status($extension)

Calculate an extension status based on current status and schema version.

Parameters

$extension: Object of a single extension info.

Return value

String describing extension status. Values: enabled|disabled|not installed

Related topics

2 calls to drush_get_extension_status()
drush_pm_list in commands/pm/pm.drush.inc
Command callback. Show a list of extensions with type and status.
_drush_pm_info_extension in commands/pm/info.pm.inc
Return an array with general info of an extension.

File

commands/pm/pm.drush.inc, line 604
The drush Project Manager

Code

function drush_get_extension_status($extension) {
  if ((drush_extension_get_type($extension) == 'module') && ($extension->schema_version == -1)) {
    $status = "not installed";
  }
  else {
    $status = ($extension->status == 1) ? 'enabled' : 'disabled';
  }

  return $status;
}