You are here

function _modules_weight_get_modules_weight in Modules weight 7

Return the modules weight.

Return value

array An array with the modules weight keyed by module machine name.

1 call to _modules_weight_get_modules_weight()
_modules_weight_modules_list in ./modules_weight.helpers.inc
Return the modules list.

File

./modules_weight.helpers.inc, line 117
Helper functions.

Code

function _modules_weight_get_modules_weight() {

  // The query.
  $query = "SELECT name,\n                   weight\n            FROM {system}\n            WHERE type = 'module'\n              AND status = 1";

  // Executing the query and getting the modules weight.
  $weight = db_query($query)
    ->fetchAllKeyed();
  return $weight;
}