public function moduleEnabled($name) {
    $this->options[] = '--format=json';
    $modules = $this->__call('pmList', []);
    if (!$modules = json_decode($modules, TRUE)) {
      throw new DrushFormatException("Cannot parse json output from drush: $modules", $modules);
    }
    $this->options = [];
    return isset($modules[$name]) && $modules[$name]['status'] === 'Enabled';
  }
public function moduleEnabled($name) {
    $this->options[] = '--format=json';
    $modules = $this->__call('pmList', []);
    if (!$modules = json_decode($modules, TRUE)) {
      throw new DrushFormatException("Cannot parse json output from drush: $modules", $modules);
    }
    $this->options = [];
    return isset($modules[$name]) && $modules[$name]['status'] === 'Enabled';
  }
public function moduleEnabled ( $ name ) { $ this -> options [ ] = '--format=json' ; $ modules = $ this -> __call ( 'pmList' , [ ] ) ; if ( ! $ modules = json_decode ( $ modules , TRUE ) ) { throw new DrushFormatException ( "Cannot parse json output from drush: $modules" , $ modules ) ; } $ this -> options = [ ] ; return isset ( $ modules [ $ name ] ) && $ modules [ $ name ] [ 'status' ] === 'Enabled' ; }
Determine if a module is enabled or not.

@param $name
The machine name of the module to check.
@return bool
Whether the module is enabled or not.

@throws DrushFormatException
Determine if a module is enabled or not .