AvailableTestDumper.php in Devel 8.3
File
tests/modules/devel_dumper_test/src/Plugin/Devel/Dumper/AvailableTestDumper.php
View source
<?php
namespace Drupal\devel_dumper_test\Plugin\Devel\Dumper;
use Drupal\devel\DevelDumperBase;
class AvailableTestDumper extends DevelDumperBase {
public function dump($input, $name = NULL) {
$input = '<pre>' . 'AvailableTestDumper::dump() ' . $input . '</pre>';
echo $input;
}
public function export($input, $name = NULL) {
$input = '<pre>' . 'AvailableTestDumper::export() ' . $input . '</pre>';
return $this
->setSafeMarkup($input);
}
public function exportAsRenderable($input, $name = NULL) {
$input = '<pre>' . 'AvailableTestDumper::exportAsRenderable() ' . $input . '</pre>';
return [
'#attached' => [
'library' => [
'devel_dumper_test/devel_dumper_test',
],
],
'#markup' => $this
->setSafeMarkup($input),
];
}
public static function checkRequirements() {
return TRUE;
}
}