If you're invoking hooks, you can probably manage basic string concatenation and a drupal_function_exists().

CommentFileSizeAuthor
#3 module_hook.patch4.66 KBcatch
#1 module_hook.patch4.65 KBcatch

Comments

catch’s picture

Status: Active » Needs review
StatusFileSize
new4.65 KB

Here's a patch.

yched’s picture

Status: Needs review » Needs work

drupal_function_exists($module, '_node_grants') ?

I guess you meant string concat :-)

catch’s picture

Status: Needs work » Needs review
StatusFileSize
new4.66 KB

Ouch.

Status: Needs review » Needs work

The last submitted patch failed testing.

casey’s picture

drupal_function_exists() is removed (#497118: Remove the registry (for functions)).

catch’s picture

Version: 7.x-dev » 8.x-dev
marvil07’s picture

When this patch was written, the module_hook() function was only doing a simple concatenation and then a call to function_exists(), but now it's doing something s a little more complicated than that.

Now it is also taking a look to lazy loaded files registered via hook_hook_info(), so I guess this can be safely closed as won't fix.

(current code link on api.d.o)

agentrickard’s picture

Status: Needs work » Closed (won't fix)