public function onCheckEmployeeVisibility(object $employee) : bool

Fires while checking whether an employee is visible or not.


Description 

This hook can be used to apply additional conditions while checking whether the specified employee is listable or not.

When this hook is triggered, the system already validated the standard conditions and the employee is going to be listed into the website.


Parameters

$employee

(object)  The employee to check.

Return Value

Boolean. False to hide the employee.


Example

/**
 * This hook can be used to apply additional conditions while checking whether
 * the specified employee is listable or not. When this hook is triggered, the
 * system already validated the standard conditions and the employee is going
 * to be listed into the website.
 *
 * @param   object   $employee  The employee to check.
 *
 * @return  boolean  False to hide the employee.
 */
public function onCheckEmployeeVisibility($employee)
{
    /**
     * @todo apply some custom validations
     */

    return true;
}

Changelog

VersionDescription
1.7 Introduced.
Last Update: 2021-10-06 17:30
Helpful?
This site uses cookies. By continuing to browse you accept their use. Further information