kpr() just krumo's and dumps the value right here, right now. This means that dpm() will work and let you see the output even if you're redirected. The difference between those two and kpr() is that dpm() does a permissions check to make sure the current user has permission to view devel's output, and then puts the krumo'd variable dump into the message queue via drupal_set_message(). The idea is that dsm() was a poor name for the function, it's short for drupal set message, but what was later decided that drupal print (as in print_r) message was better. The two functions are identical since dsm() is just a wrapper for dpm(). It is a legacy function and dpm() is the newer name. You may not have heard of the function dsm() before now. In this video you'll also learn about some of the helper functions built into the devel module that make it simpler to inspect the large nested arrays that you'll commonly come across when writing code for Drupal. This video walks through the handy devel module from and demonstrates the tools it provides for debugging, inspecting and analyzing the code and SQL queries happening on your site. Even if you are quite comfortable with PHP but are struggling to understand how to appropriately interact with Drupal 7's API, the lessons in this series can help you develop "The Drupal Way." Additional resources This series starts with the basics and moves you step-by-step to more advanced concepts. Drupal's contributed module projects number in the thousands, but what if there isn't a module for your use case? You just might need to build a module for that. Many times you can find a module that provides the functionality you need - or at least pretty close to what you need. Even if you are quite comfortable with PHP but are struggling to understand how to appropriately interact with Drupal 7's API, the lessons in this series can help you develop "The Drupal Way." Over the course of this series you'll be able to: You'll build several different modules that explore and interact with Drupal's various systems and API, including: We'll take a look at the Devel module and learn how to use it to inspect the variables, objects, arrays and other things at work under the hood of Drupal 7. In this series, you will learn about the tools and resources available to Drupal developers, including where to find documentation and what APIs are available to you, both on and. Drupal's contributed module projects number in the thousands, but what if there isn't a module for what your use case? You just might need to build a module for that. You've probably heard this before and many times you can find a module that provides the functionality you need - or at least pretty close to what you need.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |