list = $list; $this->sessionConfig = $sessionConfig; $this->config = $config; $this->persistentHelper = $persistentHelper; $this->cookieConfig = $cookieConfig; } /** * @inheritDoc */ public function getList(): array { $magentoCookieLifeTime = $this->sessionConfig->getCookieLifetime(); $persistentLifeTime = $this->persistentHelper->getLifeTime(); $dynamicCookie = [ GetUserConsentInterface::COOKIE_CONSENT_NAME => [ 'category_key' => CategoryKey::KEY_NECESSARY, 'type' => Type::TYPE_FIRST, 'duration' => $this->config->getConsentExpiry(), 'description' => 'Keeps your cookie consent.' ], SetCookieConsentId::COOKIE_CONSENT_ID => [ 'category_key' => CategoryKey::KEY_NECESSARY, 'type' => Type::TYPE_FIRST, 'duration' => $this->config->getConsentExpiry(), 'description' => 'Keeps your cookie consent id.' ], 'form_key' => [ 'category_key' => CategoryKey::KEY_NECESSARY, 'type' => Type::TYPE_FIRST, 'duration' => $magentoCookieLifeTime, 'description' => 'A security measure that appends a random ' . 'string to all form submissions to protect the data from ' . 'Cross-Site Request Forgery (CSRF).' ], 'X-Magento-Vary' => [ 'category_key' => CategoryKey::KEY_NECESSARY, 'type' => Type::TYPE_FIRST, 'duration' => $magentoCookieLifeTime, 'description' => 'Configuration setting that improves performance ' . 'when using Varnish static content caching.' ], 'private_content_version' => [ 'category_key' => CategoryKey::KEY_NECESSARY, 'type' => Type::TYPE_FIRST, 'duration' => $persistentLifeTime, 'description' => 'Appends a random, unique number and time to pages with customer content to prevent ' . 'them from being cached on the server.' ], 'persistent_shopping_cart' => [ 'category_key' => CategoryKey::KEY_NECESSARY, 'type' => Type::TYPE_FIRST, 'duration' => $persistentLifeTime, 'description' => 'Stores the key (ID) of persistent cart to make it possible to restore the cart ' . 'for an anonymous shopper.' ], // Magento Commerce only 'add_to_cart' => [ 'category_key' => CategoryKey::KEY_STATISTICS, 'type' => Type::TYPE_FIRST, 'duration' => Duration::ONE_HOUR, 'description' => 'Used by Google Tag Manager. Captures the product SKU, name, price and quantity ' . 'removed from the cart, and makes the information available for future integration by third-party '. 'scripts.' ], 'mage-banners-cache-storage' => [ 'category_key' => CategoryKey::KEY_NECESSARY, 'type' => Type::TYPE_FIRST, 'duration' => Duration::ONE_HOUR, 'description' => 'Stores banner content locally to improve performance.' ], 'remove_from_cart' => [ 'category_key' => CategoryKey::KEY_STATISTICS, 'type' => Type::TYPE_FIRST, 'duration' => Duration::ONE_HOUR, 'description' => 'Used by Google Tag Manager. Captures the product SKU, name, price and quantity ' . 'added to the cart, and makes the information available for future integration by third-party ' . 'scripts.' ], ]; return array_merge($this->cookieConfig->get('cookies'), $this->list, $dynamicCookie); } }