public function onAfterSaveReservationLate(array $data, bool $isNew, JModel $model) : void

Fires once all the details of the appointment has been saved.


Description

This hook is triggered after creating or updating an appointment record.

Use this hook in place of onAfterSaveReservation in case you wish to immediately access the saved extra data of the reservation, such as the options, the user notes and so on.


Parameters

$data

(array)  The properties of the appointment that have been saved.

$isNew

(bool)  True in case the appointment has been created, false in case an existing appointment was updated.

$model

(JModel)  The model instance that handles the saving process.

Return Value

None.


Example

/**
 * Trigger hook to allow the plugins to make something after
 * saving an appointment.
 *
 * @param   mixed    $data    The saved record.
 * @param   boolean  $isNew   True if new, false in case of update.
 * @param   JModel   $model   The model instance.
 *
 * @return  void
 */
public function onAfterSaveReservationLate($data, $isNew, $model)
{
    // it is now possible to access the appointment details
    $order = VAPOrderFactory::getAppointments($data['id']);

    /**
     * @todo do something after saving an appointment
     */
}

Changelog

VersionDescription
1.7 Introduced.
Last Update: 2021-10-05 16:53
Helpful?
See Also: