You are here

function _esi_panels__get_task_identifier in ESI: Edge Side Includes 7.3

Reverse the $display->cache_key encoding to get the task name (and sub-task if used).

Parameters

string $task_name: The task key, as used by a display cache_key.

Return value

array

  • 0 => Name of the task.
  • 1 => Name of the subtask (or '' if not set).
1 call to _esi_panels__get_task_identifier()
esi_panels__esi_pane_prepare in modules/esi_panels/esi_panels.esi.inc
Prepare an ESI panels pane for rendering. Defined in hook_esi_component_info().

File

modules/esi_panels/esi_panels.module, line 432
ESI handler for panel panes.

Code

function _esi_panels__get_task_identifier($task_name) {
  if (strpos($task_name, '-')) {
    list($task, $subtask) = explode('-', $task_name, 2);
    return array(
      $task,
      $subtask,
    );
  }
  else {
    return array(
      $task_name,
      '',
    );
  }
}