You are here

function page_manager_page_import_subtask_submit 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_import_subtask_submit()

Submit the import page to create the new page and redirect.

File

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

Code

function page_manager_page_import_subtask_submit($form, &$form_state) {
  $page =& $form_state['page']->subtask['subtask'];
  $page->name = $form_state['values']['name'];
  $page->path = $form_state['values']['path'];
  $task_name = page_manager_make_task_name('page', $page->name);
  $cache = page_manager_get_page_cache($task_name);
  if (!$cache) {
    $cache = new stdClass();
  }
  page_manager_page_new_page_cache($page, $cache);
  page_manager_set_page_cache($cache);
  $form_state['redirect'] = page_manager_edit_url($task_name);
}