English (United Kingdom)

apply_filters_ref_array( 'vikappointments_build_employees_list_data', bool $status, array &$employeesJModelVAP $model )

Fires before returning the array of employees.


Description

Trigger hook to manipulate at runtime the response of the query used to load the employees to display, under the Employees List page.

Third party plugins can alter the resulting list of employees.


Parameters

$status

(bool)  True on success, false otherwise.

&$employees

(array)  An array of employees.

$model

(JModelVAP)  The model responsible of loading the data needed to the Employees List page.


Example 

/**
 * Trigger hook to manipulate the query response at runtime. Third party
 * plugins can alter the resulting list of employees.
 *
 * @param  boolean    $status      True on success, false otherwise.
 * @param  array      &$employees  An array of employees.
 * @param  JModelVAP  $model       The view model.
 */
add_filter('vikappointments_build_employees_list_data', function($status, &$employees, $model)
{
    /**
     * @todo do stuff here
     */

    // eg. randomize the ordering of the employees
    shuffle($employees);

    return true;
}, 10, 3);

Changelog

Version Description
1.2 Introduced.
Last Update: 2021-07-30
Helpful?
See Also:

This website uses cookies

This website uses cookies and similar technologies. Some of these technologies are necessary for the proper functioning of the website (Essential). Other technologies are used to evaluate user behavior (Analysis), to integrate external media or for advertising purposes. If you agree, these technologies are activated. For details, please refer to the privacy policy. From this same page you can also update/revoke your consent. If you do not give your consent, only cookies with essential functions will be activated.

We use technologies from the USA on our website. If you give your consent, you therefore consent at the same time to your data being transferred to the USA. We would like to point out that the USA does not have a level of data protection comparable to that of the EU and that any US company can be obliged by state authorities to hand over your data without you having any effective legal protection against this.