You are here

public function GingerbreadReturn::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/GingerbreadReturn.php, line 47

Class

GingerbreadReturn

Namespace

Drupal\bakery\Cookies

Code

public function toData() : array {
  $data = [];
  foreach ($this->extra as $k => $v) {
    $data[$k] = $v;
  }
  return [
    'name' => $this->name,
    'mail' => $this->mail,
    'uid' => $this->uid,
  ] + $data;
}