function panels_content_form in Panels 5.2
Same name and namespace in other branches
- 6.2 content_types/form.inc \panels_content_form()
Output function for the 'node' content type. Outputs a node based on the module and delta supplied in the configuration.
1 string reference to 'panels_content_form'
- panels_form_panels_content_types in content_types/
form.inc - Callback function to supply a list of content types.
File
- content_types/
form.inc, line 42
Code
function panels_content_form($conf, $panel_args, &$context) {
$block = new stdClass();
$block->module = 'form';
if (isset($context->form)) {
$block->subject = $context->form_title;
if (!empty($context->form_id)) {
// If this is a form, drupal_render it.
$block->content = drupal_render($context->form);
}
else {
// Otherwise just spit back what we were given. This is probably an
// error message or something.
$block->content = $context->form;
}
$block->delta = $context->form_id;
}
else {
$block->subject = t('Form');
$block->content = t('Form goes here.');
$block->delta = 'unknown';
}
return $block;
}