You are here

public function VarDumperMessage::dump in VarDumper 7

Same name and namespace in other branches
  1. 8 src/VarDumper/VarDumperMessage.php \Drupal\vardumper\VarDumper\VarDumperMessage::dump()

File

src/VarDumper/VarDumperMessage.php, line 41
Contains Drupal\vardumper\VarDumper\VarDumperMessage.

Class

VarDumperMessage

Namespace

Drupal\vardumper\VarDumper

Code

public function dump($var, $name = '') {
  if (!$this
    ->hasPermission()) {
    return;
  }
  $html = $this
    ->getHeaders($name, $this
    ->getDebugInformation()) . $this
    ->getDebug($var);
  $this->messenger
    ->addMessage($html, 'status', FALSE);
}