Your cart is empty!
Before Save
public function onBeforeSaveConfig(array &$config, JModel model) : bool
Fires before saving the configuration.
Description
This hook is triggered before updating the global configuration of VikAppointments. It can be used to bind the data that are going to be saved within the database.
In addition to this one, it is possible to use the following hooks to respectively handle the configuration of the employees, the closing days, the SMS APIs, the CRON jobs and the Applications (API and WebHooks):
onBeforeSaveConfigemp
onBeforeSaveConfigClosingDays
onBeforeSaveConfigSmsApi
onBeforeSaveConfigCron
onBeforeSaveConfigApp
Parameters
- &$config
-
(array) An associative array containing the settings to save.
- $model
-
(JModel) The configuration model used to save the settings.
Return Value
Boolean. Use false to abort the saving process.
Example
/**
* Trigger hook to allow the plugins to bind the object that
* is going to be saved.
*
* @param array &$config The configuration array.
* @param JModel $model The model instance. (added @since 1.7)
*
* @return boolean Use false to abort the saving process.
*/
public function onBeforeSaveConfig(&$config, $model)
{
/**
* @todo manipulate $config array before saving
*/
return true;
}
Changelog
Version | Description |
---|---|
1.7.0 | Introduced onBeforeSaveConfigApp hook.Added $model parameter and return value. |
1.6.6 | Introduced. |
Last Update: 2021-10-06 16:54
Helpful?