private findIfCurrentSorted ( $cookie, $relationship, $field ) : boolean | ||
$cookie | ||
$relationship | ||
$field | ||
return | boolean |
private function findIfCurrentSorted($cookie, $relationship, $field)
{
$i = 1;
foreach ($cookie as $c) {
if ((!isset($c['relationship']) || $c['relationship'] == $relationship) && (isset($c['orderBy']) && $c['orderBy'] == $field)) {
$c['count'] = $i;
return $c;
}
$i++;
}
return false;
}