class VarDumperMessage in VarDumper 7
Same name and namespace in other branches
- 8 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 14 - Contains Drupal\vardumper\VarDumper\VarDumperMessage.
Namespace
Drupal\vardumper\VarDumperView source
class VarDumperMessage extends VarDumperDebug {
/**
* The Messenger service.
*
* @var \Drupal\service_container\Messenger\LegacyMessenger
*/
protected $messenger;
/**
* The Drupal7 legacy service.
*
* @var \Drupal\service_container\Legacy\Drupal7
*/
protected $drupal7;
/**
*
*/
public function __construct(MessengerInterface $messenger, Drupal7 $drupal7) {
$this->messenger = $messenger;
$this->drupal7 = $drupal7;
}
/**
*
*/
public function dump($var, $name = '') {
if (!$this
->hasPermission()) {
return;
}
$html = $this
->getHeaders($name, $this
->getDebugInformation()) . $this
->getDebug($var);
$this->messenger
->addMessage($html, 'status', FALSE);
}
}
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 Drupal7 legacy service. | |
VarDumperMessage:: |
protected | property | The Messenger service. | |
VarDumperMessage:: |
public | function | ||
VarDumperMessage:: |
public | function |