English (United Kingdom)

apply_filters( 'vikappointments_after_save_config', bool $status, array $config, bool $changed, JModel model )

Fires after saving the configuration.


Description

This hook is triggered after updating the global configuration of VikAppointments. It can be used to apply further changes by using the new configuration settings.

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

$status

(bool)  True on success, false otherwise.

$config

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

$changed

(bool)  True in case something has changed, false otherwise.

$model

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


Example

/**
 * Trigger event to allow the plugins to make something after saving
 * a record in the database.
 *
 * @param  boolean  $status   True on success, false otherwise.
 * @param  array    $config   The configuration array.
 * @param  boolean  $changed  True in case something has changed. (added @since 1.7)
 * @param  JModel   $model    The model instance. (added @since 1.7)
 */
add_filter('vikappointments_after_save_config', function($status, $config, $changed $model)
{
    /**
     * @todo do stuff after saving the configuration
     */

    return $status;
}, 10, 4);

Changelog

Version Description
1.2.0

Introduced vikappointments_after_save_config_app hook.
Added $changed and $model parameters.

1.1.8 Introduced.
Last Update: 2021-10-06
Helpful?
See Also: