Go to the source code of this file.
Functions | |
| panels_admin_content_types_node_attachments () | |
| panels_admin_title_node_attachments ($conf, $context) | |
| panels_content_node_attachments ($conf, $panel_args, $context) | |
| panels_node_attachments_panels_content_types () | |
| panels_admin_content_types_node_attachments | ( | ) |
Return all content types available.
Definition at line 47 of file node_attachments.inc.
References panels_get_path().
00047 { 00048 return array( 00049 'node_type' => array( 00050 'title' => t('Attached files'), 00051 'icon' => 'icon_node.png', 00052 'path' => panels_get_path('content_types/node'), 00053 'description' => t('A list of files attached to the node.'), 00054 'required context' => new panels_required_context(t('Node'), 'node'), 00055 'category' => array(t('Node context'), -9), 00056 ), 00057 ); 00058 }
| panels_admin_title_node_attachments | ( | $ | conf, | |
| $ | context | |||
| ) |
| panels_content_node_attachments | ( | $ | conf, | |
| $ | panel_args, | |||
| $ | context | |||
| ) |
Output function for the 'node' content type. Outputs a node based on the module and delta supplied in the configuration.
Definition at line 26 of file node_attachments.inc.
00026 { 00027 $node = isset($context->data) ? drupal_clone($context->data) : NULL; 00028 $block = new stdClass(); 00029 $block->module = 'attachments'; 00030 00031 $block->subject = t('Attached files'); 00032 if ($node) { 00033 $block->content = theme('upload_attachments', $node->files); 00034 $block->delta = $node->nid; 00035 } 00036 else { 00037 $block->content = t('Attached files go here.'); 00038 $block->delta = 'unknown'; 00039 } 00040 00041 return $block; 00042 }
| panels_node_attachments_panels_content_types | ( | ) |
Callback function to supply a list of content types.
Definition at line 8 of file node_attachments.inc.
00008 { 00009 $items['node_attachments'] = array( 00010 'title' => t('Node type description'), 00011 // only provides a single content type 00012 'single' => TRUE, 00013 'content_types' => 'panels_admin_content_types_node_attachments', 00014 'render callback' => 'panels_content_node_attachments', 00015 // 'add callback' => 'panels_admin_edit_node_attachments', 00016 // 'edit callback' => 'panels_admin_edit_node_attachments', 00017 'title callback' => 'panels_admin_title_node_attachments', 00018 ); 00019 return $items; 00020 }
1.5.6