function AvailableTestDumper::exportAsRenderable
Same name in other branches
- 4.x tests/modules/devel_dumper_test/src/Plugin/Devel/Dumper/AvailableTestDumper.php \Drupal\devel_dumper_test\Plugin\Devel\Dumper\AvailableTestDumper::exportAsRenderable()
Overrides DevelDumperBase::exportAsRenderable
File
-
tests/
modules/ devel_dumper_test/ src/ Plugin/ Devel/ Dumper/ AvailableTestDumper.php, line 43
Class
- AvailableTestDumper
- Provides a AvailableTestDumper plugin.
Namespace
Drupal\devel_dumper_test\Plugin\Devel\DumperCode
public function exportAsRenderable($input, $name = NULL) : array {
// Add a predetermined string to $input to check if this dumper has been
// selected successfully.
$input = '<pre>AvailableTestDumper::exportAsRenderable() ' . $input . '</pre>';
return [
'#attached' => [
'library' => [
'devel_dumper_test/devel_dumper_test',
],
],
'#markup' => $this->setSafeMarkup($input),
];
}