You are here

function panels_display::add_pane in Panels 6.2

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. 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 477
panels.module

Class

panels_display
Forms the basis of a panel display

Code

function add_pane($pane, $location = FALSE) {
  $pane->pid = $this
    ->next_new_pid();
  if (!$location || !isset($this->panels[$location])) {
    foreach ($this->panels as $panel_name => $panel) {
      if (array_key_exists($pane->pid, $panel)) {
        $this->panels[$panel_name][] = $pane->pid;
      }
    }
  }
  else {
    $this->panels[$location][] = $pane->pid;
  }
}