You are here

function panels_panel_context_cache_key in Panels 7.3

Build the cache key so that the editor and IPE can properly find everything needed for this display.

4 calls to panels_panel_context_cache_key()
panels_panel_context_edit_content in plugins/task_handlers/panel_context.inc
Present the panels drag & drop editor to edit the display attached to the task handler.
panels_panel_context_edit_move in plugins/task_handlers/panel_context.inc
When a layout is changed, the user is given the opportunity to move content.
panels_panel_context_get_addressable in plugins/task_handlers/panel_context.inc
panels_panel_context_render in plugins/task_handlers/panel_context.inc
Check selection rules and, if passed, render the contexts.

File

plugins/task_handlers/panel_context.inc, line 244
This is the task handler plugin to handle attaching a panel to any task that advertises itself as a 'context' type, which all of the basic page tasks provided by page_manager.module do by default.

Code

function panels_panel_context_cache_key($task_name, $handler_id, $args) {
  $arguments = array();
  foreach ($args as $arg) {

    // Sadly things like panels everywhere actually use non-string arguments
    // and they basically can't be represented here. Luckily, PE also does
    // not use a system where this matters, so replace its args with a 0
    // for a placeholder.
    if (is_string($arg)) {
      $arguments[] = $arg;
    }
    else {
      $arguments[] = '0';
    }
  }
  $cache_key = 'panel_context:' . $task_name . '::' . $handler_id . '::' . implode('\\', $arguments) . '::';
  return $cache_key;
}