node_book_nav.inc File Reference

(1.1.2.7 2008/06/03 01:38:06 sdboyer)

Go to the source code of this file.

Functions

 panels_admin_content_types_node_book_nav ()
 panels_admin_title_node_book_nav ($conf, $context)
 panels_content_node_book_nav ($conf, $panel_args, $context)
 panels_node_book_nav_panels_content_types ()


Function Documentation

panels_admin_content_types_node_book_nav (  ) 

Return all content types available.

Definition at line 47 of file node_book_nav.inc.

References panels_get_path().

00047                                                     {
00048   return array(
00049     'node_type' => array(
00050       'title' => t('Book navigation'),
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 }

Here is the call graph for this function:

panels_admin_title_node_book_nav ( conf,
context 
)

Definition at line 60 of file node_book_nav.inc.

00060                                                            {
00061   return t('"@s" book navigation', array('@s' => $context->identifier));
00062 }

panels_content_node_book_nav ( 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_book_nav.inc.

00026                                                                     {
00027   $node = isset($context->data) ? drupal_clone($context->data) : NULL;
00028   $block = new stdClass();
00029   $block->module = 'book_nav';
00030 
00031   $block->subject = t('Book navigation');
00032   if ($node) {
00033     $block->content = theme('book_navigation', $node);
00034     $block->delta = $node->nid;
00035   }
00036   else {
00037     $block->content = t('Book navigation goes here.');
00038     $block->delta = 'unknown';
00039   }
00040 
00041   return $block;
00042 }

panels_node_book_nav_panels_content_types (  ) 

Callback function to supply a list of content types.

Definition at line 8 of file node_book_nav.inc.

00008                                                      {
00009   if (module_exists('book')) {
00010     $items['node_book_nav'] = array(
00011       'title' => t('Node book navigation'),
00012       // only provides a single content type
00013       'single' => TRUE,
00014       'content_types' => 'panels_admin_content_types_node_book_nav',
00015       'render callback' => 'panels_content_node_book_nav',
00016       'title callback' => 'panels_admin_title_node_book_nav',
00017     );
00018     return $items;
00019   }
00020 }


Generated on Sun Feb 5 05:00:15 2012 for Panels 2 by  doxygen 1.5.6