You are here

function dynamic_background_admin_weight_form_submit in Dynamic Background 7.2

Same name and namespace in other branches
  1. 7 includes/weight.admin.inc \dynamic_background_admin_weight_form_submit()

Submit handler for the weight administration form.

It stores the weights in a sort friendly format (used in loading of default values for the form).

File

includes/weight.admin.inc, line 70
Handles the re-ordering of dynamic background extension weights to determine override order.

Code

function dynamic_background_admin_weight_form_submit($form, $form_state) {
  $weights = array();
  foreach ($form_state['values']['module'] as $name => $value) {
    $weights[] = array(
      'name' => $name,
      'weight' => $value['weight'],
    );
  }
  variable_set('dynamic_background_weight', $weights);
}