You are here

function lazy_pane_lazy_id in Lazy Pane 7

Generates a unique-id for a given pane/display instance.

1 call to lazy_pane_lazy_id()
lazy_pane_lazy_cache_get in plugins/cache/lazy.inc
A mock cache retrieval function that prevents the pane from rendering and stores its data, for later, on demand rendering.

File

plugins/cache/lazy.inc, line 152

Code

function lazy_pane_lazy_id($display, $pane) {
  $id = array(
    'lazy_pane',
  );

  // @todo Improve ID generation strategy.
  if (!empty($display->cache_key)) {
    $id[] = $display->cache_key;
  }
  else {
    $id[] = current_path();
  }
  if (!empty($pane)) {
    $id[] = $pane->type;
    $id[] = $pane->subtype;
    $id[] = $pane->pid;
    $id[] = empty($pane->did) ? '' : $pane->did;
  }
  return implode(':', $id);
}