devel_helper.module

Devel add-on module that outputs a themer friendly alternative to dprint_r, dpr, and dvm.

This module generates a prettier and friendlies output for the dprint_r() function that allows themers and developers to cut-n-paste the displayed variable references. Long strings of text and (x)html are also suppressed to insure that the output is read-able. Finally, themers and developers can control the number of nested arrays and objects to be displayed and then toggle open and close the arrays or objects they wish to examine.

<?php

// Basic examples
dprx($variables);
// This generate an output that initially display 3 levels of data.
dprx($variables, 3);
// This is the recommended format for the value parameter.
// By passing in the variable name ($variables) into dprint_rx()
// the output will contain the full PHP string for every variable.
dprx(array('$variables' => $variables));
?>

Learn more about the dprint_rx() function and view an example at my website http://thebigbluehouse.com/printr-not-pretty.

Notes

  • Loosely based on contemplates contemplate_array_variables() recursion.
  • Style and color scheme is based on the output from ColdFusion's <CFDUMP> tag.
Related/Similar modules

Functions

NameDescription
dprint_rxPrint a variable in a friendly and usable format to the page.
dprxShortcut alias for dprint_rx().
dvmxPrint a variable in a friendly and usable format to the 'message' area of the page. Uses drupal_set_message()
_dprint_rx_recurseRecurses a variable to generate a friendly and usable format to be displayed by dprint_rx(), dprx(), and dvmx().