function page_manager_page_export

Export a page subtask.

2 calls to page_manager_page_export()
page_manager_page_form_clone_submit in page_manager/plugins/tasks/page.admin.inc
Submit clone page form.
page_manager_page_form_export in page_manager/plugins/tasks/page.admin.inc
Entry point to export a page.
1 string reference to 'page_manager_page_export'
page_manager_schema_1 in page_manager/page_manager.install
Schema version 1 for Panels in D6.

File

page_manager/plugins/tasks/page.inc, line 462

Code

function page_manager_page_export($page, $with_handlers = FALSE, $indent = '') {
    $task = page_manager_get_task($page->task);
    $append = '';
    if ($function = ctools_plugin_get_function($task, 'export')) {
        $append = $function($page, $indent);
    }
    ctools_include('export');
    $output = ctools_export_object('page_manager_pages', $page, $indent);
    $output .= $append;
    if ($with_handlers) {
        if (is_array($with_handlers)) {
            $handlers = $with_handlers;
        }
        else {
            $handlers = page_manager_load_task_handlers(page_manager_get_task('page'), $page->name);
        }
        $output .= $indent . '$page->default_handlers = array();' . "\n";
        foreach ($handlers as $handler) {
            $output .= page_manager_export_task_handler($handler, $indent);
            $output .= $indent . '$page->default_handlers[$handler->name] = $handler;' . "\n";
        }
    }
    return $output;
}