You are here

protected function DemoUser::getEntry in Open Social 10.2.x

Same name and namespace in other branches
  1. 8.9 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::getEntry()
  2. 8 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::getEntry()
  3. 8.2 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::getEntry()
  4. 8.3 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::getEntry()
  5. 8.4 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::getEntry()
  6. 8.5 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::getEntry()
  7. 8.6 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::getEntry()
  8. 8.7 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::getEntry()
  9. 8.8 modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::getEntry()
  10. 10.3.x modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::getEntry()
  11. 10.0.x modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::getEntry()
  12. 10.1.x modules/custom/social_demo/src/DemoUser.php \Drupal\social_demo\DemoUser::getEntry()

Makes an array with data of an entity.

Parameters

array $item: Array with items.

Return value

array Returns an array.

Overrides DemoContent::getEntry

1 call to DemoUser::getEntry()
DemoUser::createContent in modules/custom/social_demo/src/DemoUser.php
Creates content.

File

modules/custom/social_demo/src/DemoUser.php, line 151

Class

DemoUser
Class DemoUser.

Namespace

Drupal\social_demo

Code

protected function getEntry(array $item) {
  $entry = [
    'uuid' => $item['uuid'],
    'name' => $item['name'],
    'mail' => $item['mail'],
    'init' => $item['mail'],
    'timezone' => $item['timezone'],
    'status' => $item['status'],
    'created' => \Drupal::time()
      ->getRequestTime(),
    'changed' => \Drupal::time()
      ->getRequestTime(),
    'roles' => array_values($item['roles']),
  ];
  return $entry;
}