function drush_get_extension_status

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

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


$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/
Command callback. Show a list of extensions with type and status.
_drush_pm_info_extension in commands/pm/
Return an array with general info of an extension.


commands/pm/, line 604
The drush Project Manager


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;