Il tuo carrello è vuoto!
After Save (Late)
do_action( 'vikrestaurants_after_save_reservation_late', array $data, bool $isNew, JModel $model )
Fires once all the details of the restaurant reservation has been saved.
Description
This hook is triggered after creating or updating a restaurant reservation record.
Use this hook in place of vikrestaurants_after_save_reservation
in case you wish to safely access the saved extra data of the reservation, such as the ordered items.
It is possible to use the following code to access all the details of the reservation.
$reservation = VREOrderFactory::getReservation($data['id']);
Parameters
- $data
-
(array) The details of the saved reservation.
- $isNew
-
(bool) Whether the reservation has been created or updated.
- $model
-
(JModel) The model used to save the reservation.
Example
/**
* Trigger event to allow the plugins to make something after saving
* a reservation into the database. Fires once all the details of
* the reservation has been saved.
*
* @param array $data The saved record.
* @param bool $isNew True if the record was inserted.
* @param JModel $model The model instance.
*/
add_action('vikrestaurants_after_save_reservation_late', function($data, $isNew, $model) {
/**
* @todo do something after saving a reservation
*/
}, 10, 3);
Changelog
Version | Description |
---|---|
1.3 | Introduced. |
Ultimo aggiornamento: 2024-01-03
Utile?