private removeFromCookie ( $all, $cookie, $newSort ) : mixed | ||
$all | ||
$cookie | ||
$newSort | ||
Результат | mixed |
private function removeFromCookie($all, $cookie, $newSort)
{
foreach ($cookie as $key => $c) {
if ($c['orderBy'] == $newSort['orderBy'] && $c['relationship'] == $newSort['relationship']) {
unset($cookie[$key]);
return $cookie;
}
}
return $cookie;
}