node_type_desc.inc File Reference

(1.1.2.9 2008/05/27 20:21:11 sdboyer)

Go to the source code of this file.

Functions

 panels_admin_content_types_node_type_desc ()
 panels_admin_title_node_type_desc ($conf, $context)
 panels_content_node_type_desc ($conf, $panel_args, $context)
 panels_node_type_desc_panels_content_types ()


Function Documentation

panels_admin_content_types_node_type_desc (  ) 

Return all content types available.

Definition at line 49 of file node_type_desc.inc.

References panels_get_path().

00049                                                      {
00050   return array(
00051     'node_type' => array(
00052       'title' => t('Node type description'),
00053       'icon' => 'icon_node.png',
00054       'path' => panels_get_path('content_types/node'),
00055       'description' => t('Node type description.'),
00056       'required context' => new panels_required_context(t('Node'), 'node'),
00057       'category' => array(t('Node context'), -9),
00058     ),
00059   );
00060 }

Here is the call graph for this function:

panels_admin_title_node_type_desc ( conf,
context 
)

Definition at line 62 of file node_type_desc.inc.

00062                                                             {
00063   return t('"@s" type description', array('@s' => $context->identifier));
00064 }

panels_content_node_type_desc ( 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_type_desc.inc.

00026                                                                      {
00027   $node = isset($context->data) ? drupal_clone($context->data) : NULL;
00028   $block = new stdClass();
00029   $block->module = 'node_type';
00030 
00031   if ($node) {
00032     $type = node_get_types('type', $node);
00033     $block->subject = $type->name;
00034     $block->content = filter_xss_admin($type->description);
00035     $block->delta   = $node->type;
00036   }
00037   else {
00038     $block->subject = t('Node type description');
00039     $block->content = t('Node type description goes here.');
00040     $block->delta   = 'unknown';
00041   }
00042 
00043   return $block;
00044 }

panels_node_type_desc_panels_content_types (  ) 

Callback function to supply a list of content types.

Definition at line 8 of file node_type_desc.inc.

00008                                                       {
00009   $items['node_type_desc'] = array(
00010     'title' => t('Node type description'),
00011     'content_types' => 'panels_admin_content_types_node_type_desc',
00012     // only provides a single content type
00013     'single' => TRUE,
00014     'render callback' => 'panels_content_node_type_desc',
00015     'add callback' => 'panels_admin_edit_node_type_desc',
00016     'edit callback' => 'panels_admin_edit_node_type_desc',
00017     'title callback' => 'panels_admin_title_node_type_desc',
00018   );
00019   return $items;
00020 }


Generated on Thu Jul 29 05:00:16 2010 for Panels 2 by  doxygen 1.5.6