You are here

block.inc in Panels 6.2

Same filename in this branch
  1. 6.2 content_types/block.inc
  2. 6.2 styles/block.inc
Same filename and directory in other branches
  1. 5.2 styles/block.inc

styles/block.inc Definition of the 'default' panel style.

File

styles/block.inc
View source
<?php

/**
 * @file styles/block.inc
 * Definition of the 'default' panel style.
 */

// ---------------------------------------------------------------------------
// Panels hooks.

/**
 * Implementation of hook_panels_style_info().
 */
function panels_block_panels_styles() {
  return array(
    'block' => array(
      'title' => t('System block'),
      'description' => t('Display the pane as a system block; this is more restrictive than the default.'),
      'render pane' => 'panels_block_style_render_pane',
    ),
  );
}

// ---------------------------------------------------------------------------
// Panels style plugin callbacks.

/**
 * Render callback.
 *
 * @ingroup themeable
 */
function theme_panels_block_style_render_pane($content, $pane, $display) {
  if (!empty($content->title)) {
    $content->subject = $content->title;
  }
  return theme('block', $content);
}

Functions

Namesort descending Description
panels_block_panels_styles Implementation of hook_panels_style_info().
theme_panels_block_style_render_pane Render callback.