You are here

protected function AccessToken::normalize in Access unpublished 8

Normalize the entity by extracting its important values.

Return value

array The normalized entity.

1 call to AccessToken::normalize()
AccessToken::preSave in src/Entity/AccessToken.php
Acts on an entity before the presave hook is invoked.

File

src/Entity/AccessToken.php, line 249

Class

AccessToken
Defines the Access token entity.

Namespace

Drupal\access_unpublished\Entity

Code

protected function normalize() {
  $keys = [
    'entity_type',
    'expire',
    'created',
    'entity_id',
  ];
  $values = array_map(function ($item) {
    return $this
      ->get($item)
      ->getValue();
  }, $keys);
  return $values;
}