The event occurs before data loading and allows to customize sorting of dataset
$conn->event->attach("beforeSort",handlerFunc);
Parameters handlerFunc:
Availability:
Sample:
function custom_sort($sorted_by){
$sorted_by->rules[0]["name"]="LENGTH(some_field)";// SORT BY LENGTH(some_field)
}
$conn->attach->event("beforeSort","custom_sort");
Back to top