getResponseCookie example

/** * Set or remove given $noCacheTag from cookie * * @param string $newTag * @param bool $remove * * @return void */
    public function setNoCacheTag($newTag$remove = false)
    {
        if ($existingTags = $this->getResponseCookie($this->response)) {
            $existingTags = explode(', ', $existingTags);
        } elseif ($this->request->getCookie('nocache')) {
            $existingTags = $this->request->getCookie('nocache');
            $existingTags = explode(', ', $existingTags);
        } else {
            $existingTags = [];
        }

        $shopId = Shopware()->Shop()->getId();

        if (!empty($newTag) && $newTag !== 'slt') {
            
Home | Imprint | This part of the site doesn't use cookies.