OPTIONS
Options
Options are the way to store extension-related settings that have an impact on a company. All the data is stored in the options table and mapped with the company_id. Here is the columns options table has.
Structure of the miniCal options Table
The options table has a similar structure to the metadata tables. It has five fields:
option_ID
company_id
- Current company id.option_name
- Name of an option (key).option_value
- Value of option (value).autoload
- Whether to load the option when extension starts up. Default is enabled. The boolean valuetrue/false.
Each record in the option_name
field will be a unique value: if you add more than one value to an option, miniCal stores this in an array in the option_value
field.
Using the Options
The Options consists of four functions that allow you to add, get, update or delete options:
Method | Description | Parameters Description | Return value |
---|---|---|---|
| Adds a new option value. |
| bool True if the option was added, null otherwise. |
| Get option value. |
| bool Value of the option. A value of any type may be returned, If there is no option in the database, boolean false is returned |
| Update option value. |
| bool True if the value was updated, false otherwise. |
| delete option value. |
| bool True if the option was deleted, false otherwise. |
Last updated