3 namespace Drupal\devel\Plugin\Devel\Dumper;
5 use Doctrine\Common\Util\Debug;
6 use Drupal\devel\DevelDumperBase;
9 * Provides a DoctrineDebug dumper plugin.
13 * label = @Translation("Default"),
14 * description = @Translation("Wrapper for <a href='http://www.doctrine-project.org/api/common/2.3/class-Doctrine.Common.Util.Debug.html'>Doctrine</a> debugging tool.")
17 class DoctrineDebug extends DevelDumperBase {
22 public function export($input, $name = NULL) {
23 $name = $name ? $name . ' => ' : '';
24 $variable = Debug::export($input, 6);
28 $dump = ob_get_contents();
31 $dump = '<pre>' . $name . $dump . '</pre>';
33 return $this->setSafeMarkup($dump);
39 public function exportAsRenderable($input, $name = NULL) {
40 $output['container'] = [
42 '#title' => $name ? : $this->t('Variable'),
44 'library' => ['devel/devel']
47 'class' => ['container-inline', 'devel-dumper', 'devel-selectable'],
50 '#markup' => $this->export($input),
60 public static function checkRequirements() {