Symfony var-dumper wrapper for Drupal 8

Installs: 17

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Type:drupal-module

v1.5 2024-03-06 09:53 UTC

This package is auto-updated.

Last update: 2024-05-06 10:20:11 UTC


README

Examples

<?php
$node = Node::load(1);

#Print $node dump to screen 
dm($node);

#Print $node dump to system watchdog
wdm($node);

function wdm($object, $type = 'wdm'){
    \Drupal::logger($type)->notice('<pre><code>' . print_r($object, TRUE) . '</code></pre>' );
}

Or in twig file:

{{ dm(node) }}

Install

composer require alangasar/dm