Here is a list of functions which a module can contain to do a specific action.
Function Name | Description | Return | Parameters |
---|---|---|---|
admin_area() | A page accessible by admins. It is designed to be used with the admin_menu_category, admin_menu_name, admin_menu_icon and admin_permission module settings to access the page. | N/A | N/A |
user_area() | A page accessible by users. It is designed to be used with the user_menu_name and user_menu_icon module settings to access the page. | N/A | N/A |
cron() | This function is called every time the cron job for Billic runs. Billic recommends cron to be run every minute. If you need to do something every hour then you should add a timer to config (Example). | N/A | N/A |
user_cp($service) | This is the control panel page for a service. It can be viewed by both users and admins. | N/A | $service - An array containing the row of the service from the database. |
suspend($service) | This is called when Billic needs to suspend the service | (bool) true on success or the (string) error message | $service - An array containing the row of the service from the database. |
unsuspend($service) | This is called when Billic needs to reactivate the service | (bool) true on success or the (string) error message | $service - An array containing the row of the service from the database. |
terminate($service) | This is called when Billic needs to terminate the service | (bool) true on success or the (string) error message | $service - An array containing the row of the service from the database. |
create($vars, $service, $plan, $user_row) | This is called when Billic needs to create the service | (bool) true on success or the (string) error message | $vars - An array of module_vars which have been defined in the order form. $service - An array containing the row of the service from the database. $plan - An array containing the plan data $user_row - An array containing the data of the user who owns the service. |
ordercheck($vars) | Called by the order form to check the input of user data and select the name of the servoice | (string) the name of the service | $vars - An array of module_vars which have been defined in the order form. |
sync_limits($service) | This is called when an admin clicks on "Sync Limits" for the service. This is used to update plan values to a remote control panel. | (bool) true on success or the (string) error message | $service - An array containing the row of the service from the database. |
settings() | Adds a settings page to the admin Modules area. Allows settings to be configured for your script. | N/A | You should echo a HTML form for it to be displayed. |
api() | Provides API access to the module. | N/A | Example |
global_before_header() | Billic calls this function before the header is generated. | N/A | N/A |
global_after_header() | Billic calls this function after the header is generated. | N/A | N/A |
global_before_footer() | Billic calls this function before the footer is generated. | N/A | N/A |
global_after_footer() | Billic calls this function after the footer is generated. | N/A | N/A |