You are here

function panels_display::next_new_pid in Panels 6.2

Same name and namespace in other branches
  1. 5.2 panels.module \panels_display::next_new_pid()
  2. 6.3 panels.module \panels_display::next_new_pid()
1 call to panels_display::next_new_pid()
panels_display::add_pane in ./panels.module

File

./panels.module, line 505
panels.module

Class

panels_display
Forms the basis of a panel display

Code

function next_new_pid() {

  // necessary if/until we use this method and ONLY this method for adding temporary pids.
  // then we can do it with a nice static var.
  $id = array(
    0,
  );
  foreach (array_keys($this->content) as $pid) {
    if (!is_numeric($pid)) {
      $id[] = substr($pid, 4);
    }
  }
  $next_id = end($id);
  return ++$next_id;
}