You are here

function icon_set_module_weight in Icon API 8

Same name and namespace in other branches
  1. 7 icon.install \icon_set_module_weight()

Set module weight.

1 call to icon_set_module_weight()
icon_block_install in modules/icon_block/icon_block.install
Implements hook_install().

File

./icon.install, line 44
icon.install Install, uninstall, and update functions for icon.module.

Code

function icon_set_module_weight($module, $weight = 100) {
  \Drupal::database()
    ->query("UPDATE {system} SET weight = :weight WHERE name = :module AND type = 'module'", array(
    ':module' => $module,
    ':weight' => $weight,
  ));
}