How to use helper/private methods with a .module file?
Let’s say I use a hook with a lot of code inside. To improve readability and reusability I’d like to use helper/private methods. However, a Drupal .module file is not a class.
The idea is to split big methods from this file into more readable and reusable smaller methods.
What is the correct way to call helper/private methods from a Drupal .module file?
This article was republished from its original source.
Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.