public function onBuildEmployeesListData(array &$employeesJModelVAP $model) : void

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

&$employees

(array)  An array of employees.

$model

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

Return Value

None.


Example

/**
 * Trigger hook to manipulate the query response at runtime. Third party
 * plugins can alter the resulting list of employees.
 *
 * @param   array      &$employees  An array of employees.
 * @param   JModelVAP  $model       The view model.
 *
 * @return  void
 */
public function onBuildEmployeesListData(&$employees, $model)
{
    /**
     * @todo do stuff here
     */

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

Changelog

VersionDescription
1.7 Introduced.
Last Update: 2021-10-11 09:30
Helpful?
See Also: