class VarDumperBlock in VarDumper 8
Same name in this branch
- 8 modules/vardumper_block/src/VarDumper/VarDumperBlock.php \Drupal\vardumper_block\VarDumper\VarDumperBlock
- 8 modules/vardumper_block/src/Plugin/Block/VarDumperBlock.php \Drupal\vardumper_block\Plugin\Block\VarDumperBlock
Same name and namespace in other branches
- 7 modules/vardumper_block/src/VarDumper/VarDumperBlock.php \Drupal\vardumper_block\VarDumper\VarDumperBlock
The VarDumperBlock class.
Hierarchy
- class \Drupal\vardumper\VarDumper\VarDumperDebug
- class \Drupal\vardumper_block\VarDumper\VarDumperBlock
Expanded class hierarchy of VarDumperBlock
1 string reference to 'VarDumperBlock'
- vardumper_block.services.yml in modules/
vardumper_block/ vardumper_block.services.yml - modules/vardumper_block/vardumper_block.services.yml
1 service uses VarDumperBlock
- vardumper_block in modules/
vardumper_block/ vardumper_block.services.yml - \Drupal\vardumper_block\VarDumper\VarDumperBlock
File
- modules/
vardumper_block/ src/ VarDumper/ VarDumperBlock.php, line 12
Namespace
Drupal\vardumper_block\VarDumperView source
class VarDumperBlock extends VarDumperDebug {
/**
* The Session service.
*
* @var Session
*/
protected $session;
/**
* {@inheritdoc}.
*/
public function __construct(SessionInterface $session) {
$this->session = $session;
}
/**
* {@inheritdoc}.
*/
public function dump($var, $name = '') {
if (!$this
->hasPermission()) {
return;
}
$html = $this
->getHeaders($name, $this
->getDebugInformation()) . $this
->getDebug($var);
$this->session
->getFlashBag()
->add('vardumper', Markup::create($html));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
VarDumperBlock:: |
protected | property | The Session service. | |
VarDumperBlock:: |
public | function | . | |
VarDumperBlock:: |
public | function | . | |
VarDumperDebug:: |
protected | property | ||
VarDumperDebug:: |
protected | property | ||
VarDumperDebug:: |
public | function | ||
VarDumperDebug:: |
public | function | ||
VarDumperDebug:: |
public | function | ||
VarDumperDebug:: |
public | function |