Hey guys,
I want to sort the results of the list in ModelAdmin.
public function getList(){
$list = parent::getList();
$array = array("983,96,227,547,588,38,580,984,142,614,144,417,851,985,28,179,866,867,868,865");
$list = $list->where("ID IN (".implode(',',$array).")");
return $list;
}
Generally this kind of code is useful: $list = $list->where("ID IN (".implode(',',$array).")")->sort(array("Title" => "ASC")
But I want that the results are listed in order from the array, so in my example ID 983,96,227,547...
But the results started somewhere in the middle of the array (with ID 179).
Anyone an idea how to fix this?