hasCookieWithTechnicalName example


    }

    protected function removeInvalidCookiesFromPreferences(Request $request, Response $response, array $preferences): array
    {
        $allowedCookies = $this->cookieGroupCollection;

        foreach ($preferences['groups'] as $group) {
            foreach ($group['cookies'] as $cookie) {
                $cookieCollection = $allowedCookies->getGroupByName($group['name'])->getCookies();

                if ($this->hasCookieWithTechnicalName($cookieCollection$cookie['name'])) {
                    continue;
                }

                unset($preferences['groups'][$group['name']]['cookies'][$cookie['name']]);
                $this->setNewPreferencesCookie($request$response$preferences);
            }
        }

        return $preferences;
    }

    
Home | Imprint | This part of the site doesn't use cookies.