You are here

function panels_display::next_new_pid in Panels 5.2

Same name and namespace in other branches
  1. 6.3 panels.module \panels_display::next_new_pid()
  2. 6.2 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 595
panels.module Core API for Panels. Provides display editing and rendering capabilities.

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