function page_manager_handler_import_submit
Clone an existing task handler into a new handler.
File
-
page_manager/
page_manager.admin.inc, line 1530
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),
);
}