function ctools_user_contact_content_type_render

cis7 user_contact.inc ctools_user_contact_content_type_render($subtype, $conf, $panel_args, $context)
cle7 user_contact.inc ctools_user_contact_content_type_render($subtype, $conf, $panel_args, $context)
elmsmedia7 user_contact.inc ctools_user_contact_content_type_render($subtype, $conf, $panel_args, $context)
icor7 user_contact.inc ctools_user_contact_content_type_render($subtype, $conf, $panel_args, $context)
meedjum_blog7 user_contact.inc ctools_user_contact_content_type_render($subtype, $conf, $panel_args, $context)
mooc7 user_contact.inc ctools_user_contact_content_type_render($subtype, $conf, $panel_args, $context)

Render the custom content type.

File

sites/all/modules/ulmus/ctools/plugins/content_types/contact/user_contact.inc, line 21

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;
}