PostNuke Help |
||
|---|---|---|
Previous |
Next |
|
carry out hook operations for module
bool pnModCallHooks(hookobject, hookaction, hookid, extrainfo);
pnModCallHooks() carries out hook operations for a module
the object the hook is called for - either 'item' or 'category'
the action the hook is called for - one of 'create', 'delete', 'transform', or 'display'
the id of the object the hook is called for (module-specific)
extra information for the hook, dependent on hookaction
This returns the hook output as string. This function returns void if an exception was raised.
This function raises DATABASE_ERROR if an error occurs while querying data. This function throw back exceptions raised by other functions.
Each hook for the module is called in turn. If the action is 'display' the result is the concatenation of each hook output where the hook area is 'GUI'. Otherwise the result is the extrainfo returned by the last hook that is called.
The list of hook actions is constantly being refined. Check the source code for a current list. TODO: Have an official online hook action registry.
// Let any hooks know that we are displaying an item. As this is a display
// hook we're passing a URL as the extra info, which is the URL that any
// hooks will show after they have finished their own work. It is normal
// for that URL to bring the user back to this function
$output->SetInputMode(_PNH_VERBATIMINPUT);
$output->Text(pnModCallHooks('item',
'display',
$tid,
pnModURL('Template',
'user',
'display',
array('tid' => $tid))));
$output->SetInputMode(_PNH_PARSEINPUT);
pnModRegisterHook(), pnModUnregisterHook()
Previous |
Next |