You are here

public function VarDumperMessage::dump in VarDumper 8

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

.

File

src/VarDumper/VarDumperMessage.php, line 26

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
    ->addStatus(Markup::create($html));
}