Italian (Italy)

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.
Ultimo aggiornamento: 2021-10-06
Utile?
Potrebbe interessarti: