Drupal 7 Module Development - Permissions and Configuration links

I'm sure there is a very good reason for this, and I'm just as sure I don't understand why it couldn't somehow be done consistently. I'm talking about the disconnect between module permissions and module configuration in Drupal.

OK say you're developing a module and you're using hook_perm, or hook_permissions if it's a Drupal 7 (or even 8!) module. Drupal will pick up on your hook and display a permissions link in the module table right next to your module.

I'm going to go out on a limb here and say hook_help works the same way. I don't usually use hook_help though because, well because I don't get paid any extra if I add helpful text to a module I'm developing to use on my own site. Anyway, I digress.

Now there is no hook_configure. But there is a configure link you can make show up in that module table alongside the Permissions link. How do you get it to show up? You put the path to the admin page corresponding to the Configure link in your module's .info file.

Simple, effective, and just inconsistent enough to trip up a novice module developer. Or even a veteran module developer with a mental block against odd inconsistencies.

Powered by Drupal, an open source content management system