1 layout.admin.inc layout_reorder_form_submit(&$form, &$form_state)

Submit handler for layout_reorder_form().

File

core/modules/layout/layout.admin.inc, line 2124
Administrative functions for Layout module.

Code

function layout_reorder_form_submit(&$form, &$form_state) {
  foreach ($form_state['layouts'] as $name => $layout) {
    $layout->weight = (int) $form_state['values']['layouts'][$name]['weight'];
    $layout->save();
  }
  backdrop_set_message(t('Layout order saved.'));
  $form_state['redirect'] = 'admin/structure/layouts';
}