cookieDomain = $cookieDomain; $this->cookieDuration = $cookieDuration; $this->type = $type; } /** * Get data for js usage. * * @param \Plumrocket\CookieConsent\Api\Data\CookieInterface $cookie * @return array */ public function execute(CookieInterface $cookie): array { return [ CookieInterface::NAME => $cookie->getName(), CookieInterface::CATEGORY_KEY => $cookie->getCategoryKey(), CookieInterface::TYPE => $cookie->getType(), 'typeLabel' => $this->type->getOptionText($cookie->getType()), CookieInterface::DOMAIN => $cookie->getDomain(), 'domainLabel' => $this->cookieDomain->getLabel($cookie), CookieInterface::DURATION => $cookie->getDuration(), 'durationLabel' => $this->cookieDuration->getLabel($cookie), CookieInterface::DESCRIPTION => $cookie->getDescription(), ]; } }