You are here

public function panels_display::add_pane in Panels 7.3

Same name and namespace in other branches
  1. 8.3 panels.module \panels_display::add_pane()
  2. 5.2 panels.module \panels_display::add_pane()
  3. 6.3 panels.module \panels_display::add_pane()
  4. 6.2 panels.module \panels_display::add_pane()

Add a pane.

1 call to panels_display::add_pane()
panels_display::duplicate_pane in ./panels.module
Duplicate a pane.

File

./panels.module, line 782
Core functionality for the Panels engine.

Class

panels_display
Forms the basis of a panel display.

Code

public function add_pane(&$pane, $location = NULL) {

  // If no location specified, use what's set in the pane.
  if (empty($location)) {
    $location = $pane->panel;
  }
  else {
    $pane->panel = $location;
  }

  // Generate a permanent uuid for this pane, and use
  // it as a temporary pid.
  $pane->uuid = ctools_uuid_generate();
  $pane->pid = 'new-' . $pane->uuid;

  // Add the pane to the appropriate spots.
  $this->content[$pane->pid] =& $pane;
  $this->panels[$location][] = $pane->pid;
}