You are here

function layout_admin_region_list_form_submit in Layout 7

Form submission function for layout_admin_region_list().

See also

layout_admin_region_list_form()

File

./layout.admin.regions.inc, line 87
Responsive layout builder tool administration interface for regions.

Code

function layout_admin_region_list_form_submit($form, $form_state) {
  $regions = layout_region_load_all();
  foreach ($regions as $region) {
    $region->weight = $form_state['values']['regions'][$region->name]['weight'];
    $region->custom = (int) (!$form_state['values']['regions'][$region->name]['default']);
    layout_region_save($region);
  }
  drupal_set_message(t('Saved all region changes.'));
}