You are here

function page_manager_handler_import_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_import_submit()

Clone an existing task handler into a new handler.

File

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

Code

function page_manager_handler_import_submit(&$form, &$form_state) {
  $handler = $form_state['handler'];
  page_manager_handler_add_to_page($form_state['page'], $handler, $form_state['values']['title']);
  $plugin = page_manager_get_task_handler($handler->handler);

  // It has no forms at all. Add the variant and go to its first operation.
  $keys = array_keys($plugin['operations']);
  $form_state['new trail'] = array(
    'handlers',
    $handler->name,
    reset($keys),
  );
}