class VarDumperMessage in VarDumper 8
Same name and namespace in other branches
- 7 src/VarDumper/VarDumperMessage.php \Drupal\vardumper\VarDumper\VarDumperMessage
Hierarchy
- class \Drupal\vardumper\VarDumper\VarDumperDebug
- class \Drupal\vardumper\VarDumper\VarDumperMessage
Expanded class hierarchy of VarDumperMessage
1 string reference to 'VarDumperMessage'
1 service uses VarDumperMessage
File
- src/
VarDumper/ VarDumperMessage.php, line 8
Namespace
Drupal\vardumper\VarDumperView source
class VarDumperMessage extends VarDumperDebug {
/**
* The messenger.
*
* @var \Drupal\Core\Messenger\MessengerInterface
*/
protected $messenger;
/**
* {@inheritdoc}.
*/
public function __construct(MessengerInterface $messenger) {
$this->messenger = $messenger;
}
/**
* {@inheritdoc}.
*/
public function dump($var, $name = '') {
if (!$this
->hasPermission()) {
return;
}
$html = $this
->getHeaders($name, $this
->getDebugInformation()) . $this
->getDebug($var);
$this->messenger
->addStatus(Markup::create($html));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
VarDumperDebug:: |
protected | property | ||
VarDumperDebug:: |
protected | property | ||
VarDumperDebug:: |
public | function | ||
VarDumperDebug:: |
public | function | ||
VarDumperDebug:: |
public | function | ||
VarDumperDebug:: |
public | function | ||
VarDumperMessage:: |
protected | property | The messenger. | |
VarDumperMessage:: |
public | function | . | |
VarDumperMessage:: |
public | function | . |