Your cart is empty!
Fetch Service Employees
public function onFetchServiceAvailableEmployees(mixed $search, string $date) : array
Fires while checking whether the specified service is able to host an appointment.
Description
Trigger hook to use a custom method to load the supported employees without having to use a direct query.
The plugins will have to return an array of employee IDs.
NOTE: calling $search->isServiceAvailable()
will result in recursion.
Parameters
- $search
-
(VAPAvailabilityImplementor) The instance used to check the availability.
- $date
-
(string) The check-in date (UTC).
Return Value
Array. A list of employee IDs.
Example
/**
* Trigger hook to use a custom method to load the supported employees
* without having to use a direct query. The plugins will have to return
* an array of employee IDs.
*
* @param mixed $search The availability search instance.
* @param string $date The check-in date (UTC).
*
* @return string The list of employees.
*/
public function onFetchServiceAvailableEmployees($search, $date)
{
// always include employees #1, #2 and #3
return [1, 2, 3];
}
Changelog
Version | Description |
---|---|
1.7 | Introduced. |
Last Update: 2021-10-05 17:09
Helpful?