Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By maen on
Atm I have a hook_install with about 3000 lines. So for making the code more transparent, is there an option to divide this up into multiple external files bei .inc?
Comments
module_load_include()
Hi maen,
I think you want to divide this function into sub functions, where sub functions will be placed inside INC files, thereby increasing code readability.
If thats the case then MODULE_LOAD_INCLUDE() will help you.
THX
I'll test this.