You are here

function panels_content_node_attachments in Panels 6.2

Same name and namespace in other branches
  1. 5.2 content_types/node_attachments.inc \panels_content_node_attachments()
1 string reference to 'panels_content_node_attachments'
panels_node_attachments_panels_content_types in content_types/node_attachments.inc
Callback function to supply a list of content types.

File

content_types/node_attachments.inc, line 21

Code

function panels_content_node_attachments($subtype, $conf, $panel_args, $context) {
  $node = isset($context->data) ? drupal_clone($context->data) : NULL;
  $block = new stdClass();
  $block->module = 'attachments';
  $block->subject = t('Attached files');
  if ($node) {
    $block->content = theme('upload_attachments', $node->files);
    $block->delta = $node->nid;
  }
  else {
    $block->content = t('Attached files go here.');
    $block->delta = 'unknown';
  }
  return $block;
}