module_invoke()
Invoke a hook in a particular module.Parameters
$module - The name of the module (without the .module extension).$hook - The name of the hook to invoke.
... Arguments to pass to the hook implementation.
Return value
The return value of the hook implementation. For Drupal 7 :
$block = module_invoke('block', 'block_view', 16);
@arg 1 : module name
@arg 2 : hook name like block_view, block_info
@arg 3 : id or delta of the block e.g 16, map-block_1
for Drupal 6 :
$block = module_invoke('block', 'block', 'view', 6);
@arg 1 : module name
@arg 2 : hook name like block
@arg 3 : $op of hook_block e.g. info, view, configure
@arg 4 : id or delta of the block e.g 6, map-block_1
$block = module_invoke('block', 'block_view', 16);
@arg 1 : module name
@arg 2 : hook name like block_view, block_info
@arg 3 : id or delta of the block e.g 16, map-block_1
for Drupal 6 :
$block = module_invoke('block', 'block', 'view', 6);
@arg 1 : module name
@arg 2 : hook name like block
@arg 3 : $op of hook_block e.g. info, view, configure
@arg 4 : id or delta of the block e.g 6, map-block_1
No comments:
Post a Comment