function ctools_user_contact_content_type_render

Render the custom content type.

File

plugins/content_types/contact/user_contact.inc, line 25

Code

function ctools_user_contact_content_type_render($subtype, $conf, $panel_args, $context) {
    if (empty($context) || empty($context->data)) {
        return;
    }
    if (!_contact_personal_tab_access($context->data)) {
        return;
    }
    // Build the content type block.
    $block = new stdClass();
    $block->module = 'contact';
    $block->delta = 'form';
    $block->title = t('Contact @name', array(
        '@name' => $context->data->name,
    ));
    module_load_include('inc', 'contact', 'contact.pages');
    $block->content = drupal_get_form('contact_personal_form', $context->data);
    return $block;
}