Configuration Options

As with all modules in WHASOLS, the configuration function is a required function of all registrar modules.

This defines the settings that are available for your registrar module. The name of this function must be yourmodule_getConfigArray.

The supported configuration field types include the following:

  • Text
  • Password
  • Yes/No Checkboxes
  • Dropdown Menus
  • Radio Buttons
  • Text Areas
Below are examples of the available parameters for each field type. Provisioning modules support different options defined in this way.
<?php
function yourmodule_getConfigArray()
{
    return [
        "name"=>"your module name",
        "description"=>"",
        "version"=>"",
        "author"=>"",
        "author_url"=>"",
        "configs"=>
        [
          "Username" => [
              "Name"=>"User Name",
              "Type" => "text", 
              "Size" => "20", 
              "DivColumns"=>"6",
              "Description" => "Enter your api username here"
          ],
          "Password" => [
              "Name"=>"Password",
              "Type" => "password",
              "Size" => "20",
              "DivColumns"=>"6",
              "Description" => "Enter your api password here"
          ],
          "TestMode" => [
              "Name"=>"Testing Mode",
              "Type" => "yesno", 
              "DivColumns"=>"12", 
              "Description" => "Tick on to connect to testing account and server."
          ],
          "dropdown" => [
              "Name" => "Select Box", 
              "Type" =>  "dropdown", 
              "Options" => ['key'=>'value','key2'=>'value 2','key3'=>'value3'], 
              "Description" => "Dropdown Description here", 
              "Default" => "key", 
          ],
          "radiobox" => [
              "Name" => "Radio button", 
              "Type" =>  "radio", 
              "Options" => ['key'=>'value','key2'=>'value 2','key3'=>'value3'], 
              "Description" => "Radio buttons Description here", 
              "Default" => "key2", 
          ],
        ],
      ];
}