You are here

function _custom_breadcrumbs_get_module_weight in Custom Breadcrumbs 6.2

Same name and namespace in other branches
  1. 7.2 custom_breadcrumbs.module \_custom_breadcrumbs_get_module_weight()

Retrieves active module weights from the database.

Parameters

$names: An array of module names.

Return value

An array of module weightsm indexed by module name and ordered by weight.

5 calls to _custom_breadcrumbs_get_module_weight()
custom_breadcrumbs_module_weight in ./custom_breadcrumbs.admin.inc
Lists and manages custom breadcrumb module weights.
custom_breadcrumbs_panels_ctools_render_alter in custom_breadcrumbs_panels/custom_breadcrumbs_panels.module
Implements hook_ctools_render_alter().
custom_breadcrumbs_panels_nodeapi in custom_breadcrumbs_panels/custom_breadcrumbs_panels.module
Implements hook_nodeapi().
custom_breadcrumbs_taxonomy_enable in custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module
Implements hook_enable().
custom_breadcrumbs_taxonomy_minimum_module_weight in custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module
Implements hook_minimum_module_weight().

File

./custom_breadcrumbs.module, line 1118
Provide custom breadcrumbs for node-type pages and base functionality for submodules to add custom breadcrumbs for other types of pages.

Code

function _custom_breadcrumbs_get_module_weight($names) {
  $weights = array();
  $results = db_query("SELECT name, weight FROM {system} WHERE name IN (" . db_placeholders($names, 'text') . ") AND status = 1 ORDER BY weight ASC", $names);
  while ($row = db_fetch_object($results)) {
    $weights[$row->name] = (int) $row->weight;
  }
  return $weights;
}