The config file contains all the extension's configuration details. Under the config folder you will find the config.php file, In this file use the $config variable and pass an array of key-value pairs. This array has all the configuration keys and values. This $cofig array will resolve in miniCal core automatically.
$config =array("name"=>"Minical Extension Boilerplate", "description" => "It is a sample boilerplate extension it contains the basic structure of a typical extension. It will show you the list of bookings.",
"is_default_active"=>1,"version"=>"1.0.0",// version of extension"logo"=>"",// extension's log image"view_link"=>"bookings_list",// view icon link"setting_link"=>"bookings_list",// setting icon link"categories"=>array("payment_process"),// category of extension"marketplace_product_link"=>"" );
Below is a list of each key and its default values.
How to set custom configuration
miniCal allows us to set custom configurations along with the prefined key-values, pass your key-value pair into the config array.
$config =array("name"=>"Minical Extension Boilerplate", "description" => "It is a sample boilerplate extension it contains the basic structure of a typical extension. It will show you the list of bookings.",
"is_default_active"=>1,"version"=>"1.0.0",// version of extension"logo"=>"",// extension's log image"view_link"=>"bookings_list",// view icon link"setting_link"=>"bookings_list",// setting icon link"categories"=>array("payment_process"),// category of extension"marketplace_product_link"=>"","custom_key"=>"custom value" );
"logo" this key contains the value path of the extension logo, you can place it inside of your extension folder inside any subfolder. You can name this subfolder accordingly.
For e.g.
|->minical-extension-boilerplate
|->images
|->logo.png
# for this particular example, the value of the logo key would be
"logo" => "images/logo.png"
How to use the custom configuration
For retrieving any configuration key use the given syntax below.
At the place of $this->module_name, you can also use your extension folder name.