You are here

function dpm in Devel 7

Same name and namespace in other branches
  1. 8.3 devel.module \dpm()
  2. 8 devel.module \dpm()
  3. 8.2 devel.module \dpm()
  4. 5 devel.module \dpm()
  5. 6 devel.module \dpm()
  6. 4.x devel.module \dpm()

Prints a variable to the 'message' area of the page.

Uses drupal_set_message().

Parameters

$input: An arbitrary value to output.

string $name: Optional name for identifying the output.

string $type: Optional message type for drupal_set_message(), defaults to 'status'.

Return value

input The unaltered input value.

See also

drupal_set_message()

5 calls to dpm()
backtrace_error_handler in ./devel.module
Displays backtrace showing the route of calls to the current error.
devel_page_alter in ./devel.module
Implements hook_page_alter().
devel_rules_debug_action in ./devel.rules.inc
Rules action for debugging values.
dpq in ./devel.module
Prints a SQL string from a DBTNG Select object.
dsm in ./devel.module
Legacy function that was poorly named.

File

./devel.module, line 1953
This module holds functions useful for Drupal development.

Code

function dpm($input, $name = NULL, $type = 'status') {
  if (user_access('access devel information')) {
    $export = kprint_r($input, TRUE, $name);
    drupal_set_message($export, $type);
  }
  return $input;
}