Timeline for How are user.tokens.inc and other similar files included?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 15, 2020 at 9:13 | history | edited | CommunityBot |
Commonmark migration
|
|
May 22, 2014 at 20:22 | comment | added | meustrus | Well, between eight hook implementations, one API function, and four "private" helper functions, totaling more than 500 lines, shaving off the token components (which are the largest implementations) does make it a bit easier to manage. Now that I know how that $module.tokens.inc file gets loaded I can take advantage of it. I was not aware of hook_hook_info; thanks for the answer! | |
May 22, 2014 at 20:07 | comment | added | Clive♦ | Ah ok - same response really, totally up to you :) This sort of thing will come in more useful as your module grows and you start implementing a lot of hooks. By then you'll probably want to trim the main .module file down, and the reason this hook exists will be very clear | |
May 22, 2014 at 19:36 | vote | accept | meustrus | ||
May 22, 2014 at 19:35 | comment | added | meustrus | By "should I be doing the same", I meant should I put tokens in a separate file like that? | |
May 22, 2014 at 17:10 | history | answered | Clive♦ | CC BY-SA 3.0 |