You are here

function page_manager_page_add_subtask_next in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 page_manager/plugins/tasks/page.admin.inc \page_manager_page_add_subtask_next()

Callback generated when the 'next' button is clicked.

All we do here is store the cache.

1 string reference to 'page_manager_page_add_subtask_next'
page_manager_page_add_subtask in page_manager/plugins/tasks/page.admin.inc
Page callback to add a subtask.

File

page_manager/plugins/tasks/page.admin.inc, line 353
Administrative functions for the page subtasks.

Code

function page_manager_page_add_subtask_next(&$form_state) {
  if (empty($form_state['task_name']) || $form_state['task_name'] == 'page') {

    // We may not have known the path to go next, because we didn't yet know the
    // task name. This fixes that.
    $form_state['form_info']['path'] = str_replace('%task_name', $form_state['page']->task_name, $form_state['form_info']['path']);
    $form_state['redirect'] = ctools_wizard_get_path($form_state['form_info'], $form_state['clicked_button']['#next']);
  }

  // Update the cache with changes.
  page_manager_set_page_cache($form_state['page']);
}