You are here

function page_manager_handler_rearrange_submit in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 page_manager/page_manager.admin.inc \page_manager_handler_rearrange_submit()

File

page_manager/page_manager.admin.inc, line 1587
Administrative functions for the page manager.

Code

function page_manager_handler_rearrange_submit(&$form, &$form_state) {
  $handler_info =& $form_state['page']->handler_info;
  foreach ($form_state['values']['handlers'] as $id => $info) {
    if ($handler_info[$id]['weight'] = $info['weight']) {
      $handler_info[$id]['weight'] = $info['weight'];
      $handler_info[$id]['changed'] |= PAGE_MANAGER_CHANGED_MOVED;
    }
  }

  // Sort the new cache.
  uasort($handler_info, '_page_manager_handler_sort');
}