Configuration Options
This function defines the settings that can be configured on module configuration form which required for your module.
The name of this function must be
yourmodulename_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 type of field. Fraud modules support different types of options defined in this way.
<?php
function yourmodule_getConfigArray() {
return [
"username" => [
"Name" => "Username",
"Type" => "text",
"Size" => "100",//Input field width
"Description" => "The required username.",
"Default" => "Default Value Here",
],
"password" => [
"Name" => "Password",
"Type" => "password",
"Size" => "100",//Input field width
"Description" => "The required password.",
"Default" => "Default Value Here",
],
"usessl" => [ //checkbox Button
"Name" => "Enable SSL?",
"Type" => "yesno",
"Description" => "A quick way to enable or disable this SSL",
"Default" => "yes",
],
"disk" => [ //Dropdown Select box
"Name" => "Select Box",
"Type" => "dropdown",
"Options" => ['100MB'=>'100 MB','1GB'=>'1 GB','5GB'=>'5 GB'],
"Description" => "Dropdown Description here",
"Default" => "100MB",
],
"radiobox" => [ //Dropdown Select box
"Name" => "Radio button",
"Type" => "radio",
"Options" => ['100MB'=>'100 MB','1GB'=>'1 GB','5GB'=>'5 GB'],
"Description" => "Radio buttons Description here",
"Default" => "100MB",
],
];
}
Click here to read about fraud module Supported Functions