function page_manager_save_task_handler

Write a task handler to the database.

3 calls to page_manager_save_task_handler()
HeadLinksTestCase::setUp in page_manager/tests/head_links.test
Sets up a Drupal site for running functional and integration tests.
page_manager_page_save in page_manager/plugins/tasks/page.inc
Write a page subtask to the database.
page_manager_save_page_cache in page_manager/page_manager.module
Write all changes from the page cache and clear it out.

File

page_manager/page_manager.module, line 676

Code

function page_manager_save_task_handler(&$handler) {
    $update = isset($handler->did) ? array(
        'did',
    ) : array();
    // Let the task handler respond to saves:
    if ($function = ctools_plugin_load_function('page_manager', 'task_handlers', $handler->handler, 'save')) {
        $function($handler, $update);
    }
    drupal_write_record('page_manager_handlers', $handler, $update);
    db_delete('page_manager_weights')->condition('name', $handler->name)
        ->execute();
    // If this was previously a default handler, we may have to write task handlers.
    if (!$update) {
        // @todo wtf was I going to do here?
    }
    return $handler;
}