[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/panels/plugins/styles/ -> block.inc (source)

   1  <?php
   2  // $Id: block.inc,v 1.1.2.8 2010/07/20 19:20:47 merlinofchaos Exp $
   3  
   4  /**
   5   * @file
   6   * Definition of the 'block' panel style.
   7   */
   8  
   9  // Plugin definition
  10  $plugin = array(
  11    'title' => t('System block'),
  12    'description' => t('Display the pane as a system block; this is more restrictive than the default.'),
  13    'render pane' => 'panels_block_style_render_pane',
  14    'weight' => -10,
  15  );
  16  
  17  /**
  18   * Render callback.
  19   *
  20   * @ingroup themeable
  21   */
  22  function theme_panels_block_style_render_pane($content, $pane, $display) {
  23    if (empty($content->content)) {
  24      return;
  25    }
  26  
  27    if (!empty($content->title)) {
  28      $content->subject = $content->title;
  29    }
  30  
  31    $content->region = $pane->panel;
  32    if (!isset($content->module)) {
  33      $content->module = $content->type;
  34    }
  35    if (!isset($content->delta)) {
  36      $content->delta = $content->subtype;
  37    }
  38  
  39    // If using per pane classes, $block->css_class will need to be added in your
  40    // preprocess or template, along with any other Panels specific field you
  41    // might want to utilize.
  42    return theme('block', $content);
  43  }
  44  


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7