You are here

public static function ChocolateChip::fromData in Bakery Single Sign-On System 8.2

Create from data stored in a cookie.

Parameters

array $data: The data stored in the cookie.

Return value

static

Overrides CookieInterface::fromData

1 call to ChocolateChip::fromData()
BootSubscriber::onEvent in src/EventSubscriber/BootSubscriber.php
On boot event we need to test the cookie.

File

src/Cookies/ChocolateChip.php, line 41

Class

ChocolateChip

Namespace

Drupal\bakery\Cookies

Code

public static function fromData(array $data) {
  return new static($data['name'] ?? '', $data['mail'] ?? '', $data['init'] ?? '');
}