You are here

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

Convert the data into an array to be stored into a cookie.

Return value

array The data to store in the cookie.

Overrides CookieInterface::toData

File

src/Cookies/ChocolateChip.php, line 52

Class

ChocolateChip

Namespace

Drupal\bakery\Cookies

Code

public function toData() : array {
  return [
    'name' => $this->name,
    'mail' => $this->mail,
    // should this be calculated?
    'init' => $this->init,
    'master' => $this->isMain ?? $this
      ->getIsMain(),
    'calories' => $this->calories,
  ];
}