Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Cookie.php

function Cookie::create

Parameters

self::SAMESITE_*|''|null $sameSite:

See also

self::__construct

1 call to Cookie::create()
AbstractSessionListener::onKernelResponse in vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php
@internal

File

vendor/symfony/http-foundation/Cookie.php, line 72

Class

Cookie
Represents a cookie.

Namespace

Symfony\Component\HttpFoundation

Code

public static function create(string $name, ?string $value = null, int|string|\DateTimeInterface $expire = 0, ?string $path = '/', ?string $domain = null, ?bool $secure = null, bool $httpOnly = true, bool $raw = false, ?string $sameSite = self::SAMESITE_LAX, bool $partitioned = false) : self {
    return new self($name, $value, $expire, $path, $domain, $secure, $httpOnly, $raw, $sameSite, $partitioned);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal