You are here

function devel_render_object in Devel 6

Same name and namespace in other branches
  1. 5 devel.module \devel_render_object()
  2. 7 devel.pages.inc \devel_render_object()

Menu callback; prints the render structure of the current object (currently node or user).

1 string reference to 'devel_render_object'
devel_menu in ./devel.module
Implementation of hook_menu().

File

./devel.module, line 1505

Code

function devel_render_object($type, $object) {
  $output = '';
  $title = isset($object->title) ? $object->title : $object->name;

  // not sure why menu system doesn't give us a reasonable title here.
  drupal_set_title(check_plain($title));
  $function = $type . '_build_content';
  $content = $function($object, FALSE, FALSE);
  return kdevel_print_object($content, '$' . $type . '->');
}