You are here

function dvm in Devel 8.3

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

Wrapper for DevelDumperManager::message().

Displays a Variable::export() variable to the 'message' area of the page.

Uses Drupal\Core\Messenger\MessengerInterface::addMessage()

Parameters

$input: An arbitrary value to output.

string $name: Optional name for identifying the output.

Return value

input The unaltered input value.

See also

\Drupal\devel\DevelDumperManager::message()

1 string reference to 'dvm'
DevelDumperBase::getInternalFunctions in src/DevelDumperBase.php
Returns a list of internal functions.

File

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

Code

function dvm($input, $name = NULL) {
  \Drupal::service('devel.dumper')
    ->message($input, $name, MessengerInterface::TYPE_STATUS, 'drupal_variable');
  return $input;
}