Supported Functions
The following headers contain the function names within the class.
testConnect
If you use this function, the "Test Connection" button will appear on the add/edit server page, the return value must be of a boolean data type.
create
This function starts running if the status of the service is activated; if the return value fails it does not activate the status of the product/service. Saves the error message for displaying to the administrator and notifies the administrator.
suspend
This function starts running if the status of the service is suspended, if the return value fails, it will not suspend the status of the product/service. Saves the error message for displaying to the administrator and notifies the administrator.
unsuspend
This function will start running if the suspension status of the service is removed, if the return value fails, it leaves the status of the product/service suspended. Saves the error message for displaying to the administrator and notifies the administrator.
terminate
This function starts running if the status of the service is canceled or deleted while "Delete from Server" option is enabled on the automation settings page. If the return value fails, it saves the error message for displaying to the administrator and notifies the administrator.
apply_updowngrade
When the upgrade request for the product/service is approved, this function runs, if the return value fails, it saves the error message to display to the administrator and notifies the administrator.
get_status
Used to determine the status of the virtual machine belonging to the service, the return must be of the boolean data type. If true, the server is open, if false, the server closed.
clientArea
Prints the value returned from this function in the field in the client area service detail. It comes defined by default, if you disable the function, it will give the output in pages/panel.php file to the client area.
clientArea_buttons
With this function, you can place buttons on the client area output and use a function when you click the button.
clientArea_buttons_output
You can use it to compile and output the array defined in clientArea_buttons function.
adminArea_buttons
With this function, you can place buttons on the client area output and use a function when you click the button.
adminArea_buttons_output
You can use it to compile and output the array defined in adminArea_buttons function.
adminArea_service_fields
With this function, you can insert a new field or a new configuration option in the administrator field output.
save_adminArea_service_fields
Saves extra added fields and configuration options.
list_vps
With this function, if your API service allows you to get a list of available virtual machines, the server will bring up the import option on the editing page. This allows you to synchronize servers to the WISECP.