EclipseGc

Untitled

May 8th, 2012
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.42 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * Plugins are described by creating a $plugin array which will be used
  5.  * by the system that includes this file.
  6.  */
  7. $plugin = array(
  8.   'title' => t('Workbench Moderation Node History'),
  9.   'icon' => 'icon_node.png',
  10.   'description' => t('Node history'),
  11.   'required context' => new ctools_context_required(t('Node'), 'node'),
  12.   'category' => t('Workbench Moderation'),
  13. );
  14.  
  15. /**
  16.  * Render the custom content type.
  17.  */
  18. function workbench_panels_workbench_moderation_node_history_content_type_render($subtype, $conf, $panel_args, $context) {
  19.   if (empty($context) || empty($context->data)) {
  20.     return;
  21.   }
  22.  
  23.   // Get a shortcut to the node.
  24.   $node = $context->data;
  25.  
  26.   // Build the content type block.
  27.   module_load_include('inc', 'workbench_moderation', 'workbench_moderation.node');
  28.   $block = new stdClass();
  29.   $block->module  = 'wm_node_history';
  30.   $block->content = workbench_moderation_node_history_view($node);
  31.   $block->delta   = $node->nid;
  32.  
  33.   return $block;
  34. }
  35.  
  36. /**
  37.  * Returns an edit form for custom type settings.
  38.  */
  39. function workbench_panels_workbench_moderation_node_history_content_type_edit_form($form, &$form_state) {
  40.   return $form;
  41. }
  42.  
  43. /**
  44.  * Returns the administrative title for a type.
  45.  */
  46. function workbench_panels_workbench_moderation_node_history_content_type_admin_title($subtype, $conf, $context) {
  47.   return t('"@s" node history', array('@s' => $context->identifier));
  48. }
Advertisement
Add Comment
Please, Sign In to add comment