function devel_print_object in Devel 7
Same name and namespace in other branches
- 5 devel.module \devel_print_object()
- 6 devel.module \devel_print_object()
Displays an object or array.
Parameters
array|object $object: The object or array to display.
string $prefix: Prefix for the output items (example "$node->", "$user->", "$").
boolean $header: Set to FALSE to suppress the output of the h3 tag.
Return value
string
1 call to devel_print_object()
- kdevel_print_object in ./
devel.module - Prints an object using either Krumo (if installed) or devel_print_object().
File
- ./
devel.module, line 1536 - This module holds functions useful for Drupal development.
Code
function devel_print_object($object, $prefix = NULL, $header = TRUE) {
drupal_add_css(drupal_get_path('module', 'devel') . '/devel.css');
$output = '<div class="devel-obj-output">';
if ($header) {
$output .= '<h3>' . t('Display of !type !obj', array(
'!type' => str_replace(array(
'$',
'->',
), '', $prefix),
'!obj' => gettype($object),
)) . '</h3>';
}
$output .= _devel_print_object($object, $prefix);
$output .= '</div>';
return $output;
}