PostNuke Help

Previous
pnModDelVar

Home
up

Next
pnModGetAdminMods


pnModFunc

execute a module function

Synopsis

mixed pnModFunc(modname, type, func);

Description

pnModFunc() calls a specific module function.

Parameters

modname

The well-known name of a module to execute a function from

type

The type of function to execute; currently one of 'user' or 'admin'

func

The name of the module function to execute

Return Values

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.

Exceptions

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.

Notes

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()

Examples

// Display news
$return = pnModFunc('News', 'user', 'display');
       

See Also

pnModGetVar(), pnModLoad(), pnModAPIFunc()


Previous
pnModDelVar

Home
up

Next
pnModGetAdminMods