English (United Kingdom)

do_action_ref_array( 'vikrestaurants_build_all_orders_data', array &$orders, string $groupJModelVRE $model )

Fires before returning the array of restaurant reservations or take-away orders.


Description

Trigger hook to manipulate at runtime the response of the query used to load the restaurant reservations or the take-away orders to display, under the All Orders page.

Third party plugins can alter the resulting list of reservations/orders.


Parameters

&$orders

(object[])  An array of reservations/orders.

$group

(string)  The current group ("restaurant" or "takeaway").

$model

(JModelVRE)  The model responsible of loading the data needed to the All Orders page.


Example

/**
 * Trigger hook to manipulate the query response at runtime. Third party
 * plugins can alter the resulting list of reservations/orders.
 *
 * @param  array      &$orders  An array of reservations/orders.
 * @param  string     $group    The group to use ("restaurant" or "takeaway").
 * @param  JModelVRE  $model    The view model.
 */
add_action('vikrestaurants_build_all_orders_data', function(&$orders, $group, $model) {
    /**
     * @todo do stuff here
     */
}, 10, 3);

Changelog

Version Description
1.3 Introduced.
Last Update: 2023-12-21
Helpful?
See Also: