removeCookiesFromPreferences example

$this->cookieRemoveHandler->removeAllCookies($this->request, $this->response);

            return;
        }

        if ($this->config->get('cookie_note_mode') === CookieRemoveSubscriber::COOKIE_MODE_TECHNICAL) {
            if ($allowCookie === 1) {
                return;
            }

            $this->cookieRemoveHandler->removeCookiesFromPreferences($this->request, $this->response);
        }
    }

    private function isHttpCacheEnabled(): bool
    {
        return (bool) $this->container->get('kernel')->getHttpCacheConfig()['enabled'];
    }
}

                'allowed_classes' => [
                    CookieGroupCollection::class,
                    CookieCollection::class,
                    CookieGroupStruct::class,
                    CookieStruct::class,
                ],
            ]
        );

        $cookieRemoveHandler = new CookieRemoveHandler($cookieGroupCollection);
        $cookieRemoveHandler->removeCookiesFromPreferences($request$response);

        return $response;
    }
}
Home | Imprint | This part of the site doesn't use cookies.