function panels_content_node_type_desc in Panels 5.2
Same name and namespace in other branches
- 6.2 content_types/node_type_desc.inc \panels_content_node_type_desc()
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_node_type_desc'
- panels_node_type_desc_panels_content_types in content_types/
node_type_desc.inc - Callback function to supply a list of content types.
File
- content_types/
node_type_desc.inc, line 25
Code
function panels_content_node_type_desc($conf, $panel_args, $context) {
$node = isset($context->data) ? drupal_clone($context->data) : NULL;
$block = new stdClass();
$block->module = 'node_type';
if ($node) {
$type = node_get_types('type', $node);
$block->subject = $type->name;
$block->content = filter_xss_admin($type->description);
$block->delta = $node->type;
}
else {
$block->subject = t('Node type description');
$block->content = t('Node type description goes here.');
$block->delta = 'unknown';
}
return $block;
}