You are here

function ctools_contact_content_type_render in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 plugins/content_types/contact/contact.inc \ctools_contact_content_type_render()

Render the custom content type.

File

plugins/content_types/contact/contact.inc, line 24

Code

function ctools_contact_content_type_render($subtype, $conf, $panel_args, $context) {
  if (!user_access('access site-wide contact form')) {
    return;
  }

  // Build the content type block.
  $block = new stdClass();
  $block->module = 'contact';
  $block->delta = 'form';
  $block->title = t('Contact');
  module_load_include('inc', 'contact', 'contact.pages');
  $block->content = drupal_get_form('contact_site_form');
  return $block;
}