function page_manager_handler_add_finish

Finish the add process and make the new handler official.

1 call to page_manager_handler_add_finish()
page_manager_handler_add_submit in page_manager/page_manager.admin.inc
Handler related forms.
1 string reference to 'page_manager_handler_add_finish'
page_manager_get_operations in page_manager/page_manager.admin.inc
Take the operations array from a task and expand it.

File

page_manager/page_manager.admin.inc, line 1351

Code

function page_manager_handler_add_finish(&$form_state) {
    $page =& $form_state['page'];
    $handler = $page->new_handler;
    page_manager_handler_add_to_page($page, $handler);
    // Remove the temporary page.
    unset($page->new_handler);
    unset($page->forms);
    // Set the new destination
    $plugin = page_manager_get_task_handler($handler->handler);
    if (!empty($plugin['add finish'])) {
        $location = $plugin['add finish'];
    }
    else {
        $keys = array_keys($plugin['operations']);
        $location = reset($keys);
    }
    $form_state['new trail'] = array(
        'handlers',
        $handler->name,
        $location,
    );
    // Pass through.
    page_manager_edit_page_finish($form_state);
}