Last active
December 25, 2015 19:29
-
-
Save mrded/7027592 to your computer and use it in GitHub Desktop.
Drupal: example of hook invoking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$baz = $qux = t('Arguments'); | |
$bar = array(); | |
foreach (module_implements('foo') as $module) { | |
$bar[] = module_invoke($module, 'foo', $baz, $qux); | |
} | |
# module_invoke_all('foo', $baz, $qux); | |
function hook_foo($baz, $qux) { | |
return t('It works!'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment