Introduction
Each of these callbacks are explained in a sense of when they are executed and what to expect the function you define as the callback to expect as far as arguments. There are plenty of examples in the Nagios Fusion codebase, so make sure to take a look and see how they're being utilized in other places too.
Every callback function defined must accept two arguments: $cbtype
(the callback type) and $cbargs
(the arguments passed along) - and sometimes $cbargs
should be passed as reference.
Details
CALLBACK_FOOTER_CONTENT_END
Description |
Executed after the parent footer content is printed.
|
$cbargs definition |
Array key | Type | Description |
child | Boolean | Is this a child page? |
|
Pass by Reference? | No |
CALLBACK_FOOTER_CONTENT_START
Description |
Executed before the parent footer content is printed.
|
$cbargs definition |
Array key | Type | Description |
child | Boolean | Is this a child page? |
|
Pass by Reference? | No |
CALLBACK_FOOTER_END
Description |
Executed after either of the footers are printed.
|
$cbargs definition |
Array key | Type | Description |
child | Boolean | Is this a child page? |
|
Pass by Reference? | No |
CALLBACK_FOOTER_START
Description |
Executed before either of the footers are printed.
|
$cbargs definition |
Array key | Type | Description |
child | Boolean | Is this a child page? |
|
Pass by Reference? | No |
CALLBACK_HEADER_END
Description |
Executed after either of the headers are printed.
|
$cbargs definition |
Array key | Type | Description |
child | Boolean | Is this a child page? |
|
Pass by Reference? | No |
CALLBACK_HEADER_START
Description |
Executed before either of the headers are printed.
|
$cbargs definition |
Array key | Type | Description |
child | Boolean | Is this a child page? |
|
Pass by Reference? | No |
CALLBACK_HOME_PAGE
Description |
Executed before printing the landing page.
|
$cbargs definition |
Array key | Type | Description |
page_title | String | The title of the home page |
product_in_page_title | Boolean | Include the product name in the title? |
iframe_src | Boolean | The iframe src (href) to include |
|
Pass by Reference? | YES |
CALLBACK_SESSION_STARTED
Description |
Executed when the session is initialized.
|
CALLBACK_PROCESS_AUTH_INFO
Description |
Executed during check_login_credentials before local checking occurs.
|
$cbargs definition |
Array key | Type | Description |
credentials['username'] | String | The string containing the username |
credentials['password'] | String | The string containing the password |
login_ok | Int | The value to set if authentication was successful (1) |
debug | Array | An array of debug messages incurred during callback authentication |
error | Array | An array of error messages incurred during callback authentication |
|
Pass by Reference? | YES |
CALLBACK_POLLED_PRE
Description |
Executed directly before a server is about to be polled.
|
$cbargs definition |
Array key | Type | Description |
server | Int | The server id of the server about to be polled |
user | String | The user for whom the data is being polled |
|
Pass by Reference? | No |
CALLBACK_POLLED_POST
Description |
Executed directly after a server is polled.
|
$cbargs definition | This is a little different. The data passed here is the transformed data used via the register_poll_callback function. Before you attempt to use this function, you should be experimenting heavily with the output via print_r and var_dump to ensure that you really know what's going on. You can seriously alter the data you see in Fusion based on this callback. Use at your own risk! |
Pass by Reference? | YES |
CALLBACK_DBMAINT
Description |
Executed directly after the database maintenace subsystem runs.
|
CALLBACK_MENU_INITIALIZED
Description |
Executed directly after the internal menu object is initialized.
|
$cbargs definition | The actual $menu object is passed by reference to your defined callback. You can use $cbargs->add_link to add menu items this way. |
Pass by Reference? | YES |
CALLBACK_FUSION_LOGO
Description |
Overwrite the Fusion logo information.
|
$cbargs definition |
Array key | Type | Description |
display_fusion_logo | Boolean | Display the logo at all? |
logo_img | String | The image URL to display |
logo_text | String | The text to display in place of the word 'Fusion' |
logo_alt | String | The alternate text for the specified image |
logo_target | String | The link target for the logo |
logo_url | Boolean | The link |
|
Pass by Reference? | YES |
CALLBACK_GET_DASHBOARD
Description |
Executed after everytime a dashboard is retrieved from the database, but before it is displayed.
|
$cbargs definition | The entire dashboard array is passed by reference. Again, print_r and var_dump are your friends. |
Pass by Reference? | No |
CALLBACK_USER_CREATED
Description |
|
$cbargs definition |
Array key | Type | Description |
user_id | Int | The user id of the user created |
username | String | The username of the user created |
email | String | The email address of the user created |
level | Int | The user level of the user created (0 for non admin, 1 for admin) |
|
Pass by Reference? | No |