English (United Kingdom)

apply_filters_ref_array( 'vikappointments_before_save_config', bool $save, array &$config, JModel model )

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):

  • vikappointments_before_save_configemp
  • vikappointments_before_save_config_closing_days
  • vikappointments_before_save_config_sms_api
  • vikappointments_before_save_config_cron
  • vikappointments_before_save_config_app

Parameters

$save

(bool)  Use false to abort the saving process.

&$config

(array)  An associative array containing the settings to save.

$model

(JModel)  The configuration model used to save the settings.


Example

/**
 * Trigger hook to allow the plugins to bind the object that
 * is going to be saved.
 *
 * @param  boolean  $save     Use false to abort the saving process.
 * @param  array    &$config  The configuration array.
 * @param  JModel   $model    The model instance. (added @since 1.7)
 */
add_filter('vikappointments_before_save_config', function($save, &$config, $model)
{
    /**
     * @todo manipulate $config array before saving
     */

    return $save;
}, 10, 3);

Changelog

Version Description
1.2.0 Introduced vikappointments_before_save_config_app hook.
Added $model parameter and return value.
1.1.8 Introduced.
Last Update: 2021-10-06
Helpful?
See Also:

This website uses cookies

This website uses cookies and similar technologies. Some of these technologies are necessary for the proper functioning of the website (Essential). Other technologies are used to evaluate user behavior (Analysis), to integrate external media or for advertising purposes. If you agree, these technologies are activated. For details, please refer to the privacy policy. From this same page you can also update/revoke your consent. If you do not give your consent, only cookies with essential functions will be activated.

We use technologies from the USA on our website. If you give your consent, you therefore consent at the same time to your data being transferred to the USA. We would like to point out that the USA does not have a level of data protection comparable to that of the EU and that any US company can be obliged by state authorities to hand over your data without you having any effective legal protection against this.