You are here

function panels_display::add_pane in Panels 6.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.2 panels.module \panels_display::add_pane()
  4. 7.3 panels.module \panels_display::add_pane()
1 call to panels_display::add_pane()
panels_display::duplicate_pane in ./panels.module

File

./panels.module, line 601
panels.module

Class

panels_display
Forms the basis of a panel display

Code

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;
  }

  // Get a temporary pid for this pane.
  $pane->pid = "new-" . $this
    ->next_new_pid();

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