Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]


Modules and Plugins [+] Modules and Plugins [-]


cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]


cPAddons (Site Software) [+] cPAddons (Site Software) [-]


System Administration [+] System Administration [-]


Developer Software [+] Developer Software [-]


Back to All Documentation



integrationblogcta.jpg

UI Module Documentation

Misc. UI functions

The functions within this module may or may not be governed by a feature list. The required feature list may vary from function to function, to review a total list of the available features sets on a cPanel server, please see "Feature Manager" in WHM.

UI::showresult

API Version: 1 - Click here for documentation
Syntax: UI::showresult( resultkey )
Description: Provide a method to print the results of a function within div tags.
Parameters:  
  resultkey (string)
  Typically, this parameter should be the name of the function for which to print results. It is important that this value matches the $Cpanel::FORM value for the same name. The function must be called with this parameter and have the exact same form variable name set to the same value.
Form Data:  
  error (boolean)
  Passing 1 to this parameter will cause the output to be a div class errors. Otherwise, it will be result.
  result (string)
  This parameter will be printed in the function's output.
  resultkey (string)
  This parameter's value must match the 'resultkey' parameter.
Returns:  
 
Output will be whatever is in the 'result' form field.

UI::redirect

API Version: 1 - Click here for documentation
Syntax: UI::redirect( )
Description: Create an HTML redirect string.
Form Data:  
  url (string)
  The URL to which to redirect visitors.
Returns:  
 
<meta http-equiv="refresh" content="0;url=http://www.example.com">

UI::confirm

API Version: 1 - Click here for documentation
Syntax: UI::confirm( version )
Description: Prints the $Cpanel::FORM elements and values in HTML input tags.
Parameters:  
  version (string)
  This is a hash value that must be set to something in order for the function to proceed.
Returns:  
 
Output will resemble:
<input type="hidden" name="$element" value="$value">

Topic revision: r2 - 27 Mar 2012 - 19:27:04 - Main.JenniferDoubrava