Skip to content

Instantly share code, notes, and snippets.

@signalpoint
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save signalpoint/11c144109cfbdcdbb660 to your computer and use it in GitHub Desktop.
Save signalpoint/11c144109cfbdcdbb660 to your computer and use it in GitHub Desktop.
Drupal Devel dpm() on EntityMetaDataWrapper
/**
* @see https://www.drupal.org/documentation/entity-metadata-wrappers
* @example usage: my_dpm($wrapped_object);
*/
function my_dpm($w) {
$values = array();
foreach ($w->getPropertyInfo() as $key => $val) {
$values[$key] = $w->$key->value();
}
$callers = debug_backtrace();
dpm($callers[1]['function']);
dpm($values);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment