O'Reilly logo

Drupal 6 Theming Cookbook by Karthik Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Analyzing variables using the Devel module

While working with the Drupal API, we will often be faced with the situation where we have no idea how a variable is structured. While PHP provides a number of functions to peek into the variable, Drupal's Devel module provides a cleaner solution and a prettier interface to do the same.

In this recipe, we will be looking at the Devel module's dpm() function.

Getting ready

It is assumed that the Devel module has been installed and is enabled. It also comes with its own set of permissions and it is assumed that the current user has all the appropriate permissions including access devel information.

We will also be making use of the mysite module created earlier in this book to hold our odds and ends.

How to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required