home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (panels_renderer_single_pane.class.php)

This example Drupal source code file (panels_renderer_single_pane.class.php) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

display, empty, extends, external_settings, function, null, panels_renderer_single_pane, php, pid, plugin, render, render_pid, render_single, return

The panels_renderer_single_pane.class.php Drupal example source code


class panels_renderer_single_pane extends panels_renderer_standard {
   * The pane id of the pane that will be rendered by a call to the render()
   * method. Numeric int or string (typically if a new-# id has been used).
   * @var mixed
  var $render_pid;

   * Modified build method (vs. panels_renderer_standard::build()); takes just
   * the display, no layout is necessary.
   * @param array $plugin
   *   The definition of the renderer plugin.
   * @param panels_display $display
   *   The panels display object to be rendered.
  function init($plugin, &$display) {
    $this->plugin = $plugin;
    $this->display = &$display;

  function prepare($external_settings = NULL) {
    $this->render_pid = $external_settings;

  function render() {
    // If no requested pid, or requested pid does not exist,
    if (empty($this->render_pid) || empty($this->display->content[$this->render_pid])) {
      return NULL;
    return $this->render_pane($this->display->content[$this->render_pid]);

  function render_single($pid) {
    return $this->render_pane($this->display->content[$pid]);

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal panels_renderer_single_pane.class.php source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.