function ctools_node_form_menu_content_type_render

File

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

Code

function ctools_node_form_menu_content_type_render($subtype, $conf, $panel_args, &$context) {
    $block = new stdClass();
    $block->module = 'node_form';
    $block->title = t('Menu options');
    $block->delta = 'menu-options';
    if (isset($context->form)) {
        if (isset($context->form['menu'])) {
            $block->content['menu'] = $context->form['menu'];
            unset($block->content['menu']['#pre_render']);
            unset($block->content['menu']['#theme_wrappers']);
            $block->content['menu']['#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['menu']['#access'] = FALSE;
        }
    }
    else {
        $block->content = t('Menu options.');
    }
    return $block;
}