Provider Settings
A Mail Provider can define required settings to activate the mail provider module.
The field definitions you return from this method are used to build a form in the admin user interface that must be filled out in order to activate the mail provider module.
For example, if the module connects to a remote messaging service, this might be a username and password or a required OAuth token to authenticate to that service.
Supported field types are text, password, yesno, dropdown, radio, and textarea.
Below is an example of defined fields, with the names api_username and api_password.
<?php
function yourmodule_config() {
$configarray = [
"name" => "Your Module Name",
"description" => "Your Module Description",
"version" => "1",//Your Module Version Number
"author" => "Author Name",
"author_url" => "https://your domain name.com/",
"language" => "english",
"configs" => [ // Configuration fields
'api_username' => [
"Name" => "API Username",
"Type" => "text",
"Description" => "The required username to authenticate with messaging service.",
],
'api_password' => [
"Name" => "API Password",
"Type" => "password",
"Description" => "The required password to authenticate with messaging service.",
],
"isenable" => [ //checkbox Button
"Name" => "Enable mod?",
"Type" => "yesno",
"Size" => "55",
"Description" => "A quick way to enable or disable this module on your website ",
"Default" => "",
],
"dropdown" => [ //Dropdown Select box
"Name" => "Select Box",
"Type" => "dropdown",
"Options" => "1,2,3,4,5,6,7,8",
"Description" => "Dropdown Description here",
"Default" => "1",
],
"radiobox" => [ //Dropdown Select box
"Name" => "Radio button",
"Type" => "radio",
"Options" => "1,2,3,4,5,6,7,8",
"Description" => "Radio buttons Description here",
"Default" => "1",
],
],
];
}