function ctools_node_form_book_content_type_render

File

plugins/content_types/node_form/node_form_book.inc, line 22

Code

function ctools_node_form_book_content_type_render($subtype, $conf, $panel_args, &$context) {
    $block = new stdClass();
    $block->module = 'node_form';
    $block->title = t('Book outline');
    $block->delta = 'book-outline';
    if (isset($context->form)) {
        if (isset($context->form['book'])) {
            $block->content['book'] = $context->form['book'];
            unset($block->content['book']['#pre_render']);
            unset($block->content['book']['#theme_wrappers']);
            $block->content['book']['#type'] = '';
            // Set access to false on the original rather than removing so that
            // vertical tabs doesn't clone it. I think this is due to references.
            $context->form['book']['#access'] = FALSE;
        }
    }
    else {
        $block->content = t('Book options.');
    }
    return $block;
}