Your cart is empty!
After Save (Late)
public function onAfterSaveReservationLate( array $data, bool $isNew, JModel $model ) : void
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 onAfterSaveReservation
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.
Return Value
None.
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.
*
* @return void
*/
public function onAfterSaveReservationLate($data, $isNew, $model)
{
/**
* @todo do something after saving a reservation
*/
}
Changelog
Version | Description |
---|---|
1.9 | Introduced. |
Last Update: 2023-12-29 14:15
Helpful?