PostNuke Help |
||
|---|---|---|
Previous |
Next |
|
execute a module function
mixed pnModFunc(modname, type, func);
pnModFunc() calls a specific module function.
The well-known name of a module to execute a function from
The type of function to execute; currently one of 'user' or 'admin'
The name of the module function to execute
This function returns whatever the return value of the resultant function is if it succeeds. This function returns void if an exception was raised.
Note that the PostNuke module standards state that module functions called in this way have to return specific values themselves. For more details on this, please see the PostNuke Module Development Guide.
This function raises BAD_PARAM if you pass an invalid parameter. This function raises MODULE_FUNCTION_NOT_EXIST if the module function doesn't exist. This function throw back exceptions raised by module function.
Before calling this function you MUST load the module with pnModLoad.
For more information on well-known names of modules please refer to the documentation for pnModGetVar()
// Display news
$return = pnModFunc('News', 'user', 'display');
pnModGetVar(), pnModLoad(), pnModAPIFunc()
Previous |
Next |