[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

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

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


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7