Module Parameters
The module parameters are the data/values passed into each function when called. Every provisioning module function receives the same parameters. These parameters provide information about the specific product/service the module command runs for. The parameters also contains the settings from the product itself.
Parameters
| Variable | Type | Notes |
|---|---|---|
| product | Array | Product Parameter have all the information related to define product/service in admin area Configuration -> Product/Services |
| configurations | Array | Contains an array of all the configurable options defined on the product. Again the key being the option name in this case |
| config_options | Array | config_options Parameter have all the information related to Product/Server in admin area Configuration -> Configueable options |
| customfields | Array | customfields Parameter have all the information related to Product/Server in admin area Configuration -> Product/Services Custom Fields |
| server | Array | Server Parameter have all the information related to server in admin area Configuration -> Servers |
| client | Array | Client Parameter have all the information related to define client in admin area against client |
| Product Parameter Data mention below | ||
| pid | int | Product/Service Unique ID |
| producttype | string | The product type which can be one of hosting,server,other,addon |
| serviceid | int | Service Unique ID |
| server_id | int | Server Unique ID |
| order_id | int | Order Unique ID |
| username | string | Username generated for the service. (defaults to first 8 letters of the domain) Database Field: hosting.user_name |
| password | string | Password generated for the service. (On first creation consisting of letters & numbers, both upper & lowercase). Database Field: hosting.password |
| domain | string | The domain entered by the customer when ordering. (On first creation consisting of letters & numbers, both upper & lowercase). Database Field: hosting.domain_name |
| package | string | The domain entered by the customer when ordering. (On first creation consisting of letters & numbers, both upper & lowercase). Database Field: hosting.domain_name |
| service_title | string | Product/Service Name |
| description | string | Product/Service Description |
| is_hidden | string | YES/NO as YES equal to hidden |
| payment_time | string | Duration name as called payment terms |
| moduletype | string | Module name |
| Client Parameter Data mention below | ||
| id | int | Client Unique ID |
| firstname | string | Client First Name |
| lastname | stringstring | Client Last Name |
| username | string | Client Unique Username |
| string | Client Unique email address | |
| phonenumber | string | Client Mobile Number |
| country | string | Client Country |
| city | string | Client city |
| state | string | Client state |
| payment_method | int | Client Selected Payment Method ID |
| Server Parameter Data mention below | ||
| id | int | Unique ID |
| gid | int | Servers Group ID |
| name | string | Server Name |
| ipaddress | string | IP Address |
| assignedips | string | Assigned IP addresses |
| hostname | string | Server Hostname |
| ns1 | string | Server Name Server 1 |
| ns1ip | string | Server Name Server 1 IP address |
| ns2 | string | Server Name Server 2 |
| ns2ip | string | Server Name Server 2 IP address |
| ns3 | string | Server Name Server 3 |
| ns3ip | string | Server Name Server 3 IP address |
| ns4 | string | Server Name Server 4 |
| ns4ip | string | Server Name Server 4 IP address |
| ns5 | string | Server Name Server 5 |
| ns5ip | string | Server Name Server 5 IP address |
| type | string | Server Type |
| username | string | Server Secure Username |
| password | string | Server Secure Password |
| accesshash | string | Server Secure Access hash |
| is_secure | string | YES/NO - Is an SSL connection enabled in the Server Configuration. |
| port | string | The server port if module supports override with custom port |
| status | string | YES/NO - Is an Server enabled in the Server Configuration. |
Configurable Options
config_options are Configurable Options. These are defined in the
Configuration ->Configureable options. Config Options are set on a per product basis: $params[‘config_options’]. config_options parameter have array set of key and values.Note: Every module function except the
_Config function receives the $params array. The _Config function is unique because it is the only function that is not called in relation to a specific client instance of a product or service.Custom Fields
Values from any custom fields & configurable options are passed into modules as parameters. Passed as an array with the key being the name of the field or option.
For example for a custom field called
“Username”, would become $params[‘customfields’][‘Username’]. Likewise, a configurable option named “Disk Space”, would become $params[‘configoptions’][‘Disk Space’].