You are here

function devel_render in Devel 8

Same name and namespace in other branches
  1. 8.3 devel.module \devel_render()
  2. 8.2 devel.module \devel_render()
  3. 7 devel.module \devel_render()
  4. 4.x devel.module \devel_render()

Prints a renderable array element to the screen using kprint_r().

#pre_render and/or #post_render pass-through callback for kprint_r().

@todo Investigate appending to #suffix. @todo Investigate label derived from #id, #title, #name, and #theme.

1 string reference to 'devel_render'
DevelLocalTask::getDerivativeDefinitions in src/Plugin/Derivative/DevelLocalTask.php
Gets the definition of all derivatives of a base plugin.

File

./devel.module, line 488
This module holds functions useful for Drupal development. Please contribute!

Code

function devel_render() {
  $args = func_get_args();

  // #pre_render and #post_render pass the rendered $element as last argument.
  kpr(end($args));

  // #pre_render and #post_render expect the first argument to be returned.
  return reset($args);
}