function ctools_node_form_path_content_type_render

File

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

Code

function ctools_node_form_path_content_type_render($subtype, $conf, $panel_args, &$context) {
    $block = new stdClass();
    $block->module = 'node_form';
    $block->title = t('URL path options');
    $block->delta = 'url-path-options';
    if (isset($context->form)) {
        if (isset($context->form['path'])) {
            $block->content['path'] = $context->form['path'];
            unset($block->content['path']['#pre_render']);
            unset($block->content['path']['#theme_wrappers']);
            $block->content['path']['#type'] = '';
            $block->content['path']['alias']['#size'] /= 2;
            // 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['path']['#access'] = FALSE;
        }
    }
    else {
        $block->content = t('URL Path options.');
    }
    return $block;
}