function views_debug

cis7 views.module views_debug($message, $placeholders = array())
cle7 views.module views_debug($message, $placeholders = array())
elmsmedia7 views.module views_debug($message, $placeholders = array())
icor7 views.module views_debug($message, $placeholders = array())
meedjum_blog7 views.module views_debug($message, $placeholders = array())
mooc7 views.module views_debug($message, $placeholders = array())

Provide debug output for Views.

This relies on devel.module or on the debug() function if you use a simpletest.

Parameters

$message: The message/variable which should be debugged. This either could be

  • an array/object which is converted to pretty output
  • a translation source string which is used together with the parameter placeholders.

$placeholder: The placeholders which are used for the translation source string.

1 call to views_debug()
vpr in sites/all/modules/ulmus/views/views.module
Shortcut to views_debug()

File

sites/all/modules/ulmus/views/views.module, line 1679
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_debug($message, $placeholders = array()) {
  if (!is_string($message)) {
    $output = '<pre>' . var_export($message, TRUE) . '</pre>';
  }
  if (module_exists('devel') && variable_get('views_devel_output', FALSE) && user_access('access devel information')) {
    $devel_region = variable_get('views_devel_region', 'footer');
    if ($devel_region == 'watchdog') {
      $output = $message;
      watchdog('views_logging', $output, $placeholders);
    }
    else if ($devel_region == 'drupal_debug') {
      $output = empty($output) ? t($message, $placeholders) : $output;
      dd($output);
    }
    else {
      $output = empty($output) ? t($message, $placeholders) : $output;
      dpm($output);
    }
  }
  elseif (isset($GLOBALS['drupal_test_info'])) {
    $output = empty($output) ? t($message, $placeholders) : $output;
    debug($output);
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.