devel_themer_ajax_variables

Versions
mediamosa-21
devel_themer_ajax_variables($request_id, $call)

A menu callback used by popup to retrieve variables from cache for a recent page.

Parameters

$request_id A unique key that is sent to the browser in Drupal.Settings.devel_themer_request_id

$call The theme call for which you wish to retrieve variables.

Return value

string A chunk of HTML with the devel_print_object() rendering of the variables.

Code

sites/all/modules/devel/devel_themer.module, line 49

<?php
function devel_themer_ajax_variables($request_id, $call) {
  $file = file_directory_temp(). "/devel_themer_$request_id";
  if ($data = unserialize(file_get_contents($file))) {
    $variables = $data[$call]['variables'];
    if (has_krumo()) {
      print krumo_ob($variables);
    }
    elseif ($data[$call]['type'] == 'func') {
      print devel_print_object($variables, NULL, FALSE);
    }
    else {
      print devel_print_object($variables, '$', FALSE);
    }
  }
  else {
    print 'Ajax variables file not found. -'. check_plain($file);
  }
  $GLOBALS['devel_shutdown'] = FALSE;
  return;
}
?>