public function EventEnrollment::getEntry in Open Social 8.7
Same name and namespace in other branches
- 8.9 modules/custom/social_demo/src/Plugin/DemoContent/EventEnrollment.php \Drupal\social_demo\Plugin\DemoContent\EventEnrollment::getEntry()
- 8 modules/custom/social_demo/src/Plugin/DemoContent/EventEnrollment.php \Drupal\social_demo\Plugin\DemoContent\EventEnrollment::getEntry()
- 8.2 modules/custom/social_demo/src/Plugin/DemoContent/EventEnrollment.php \Drupal\social_demo\Plugin\DemoContent\EventEnrollment::getEntry()
- 8.3 modules/custom/social_demo/src/Plugin/DemoContent/EventEnrollment.php \Drupal\social_demo\Plugin\DemoContent\EventEnrollment::getEntry()
- 8.4 modules/custom/social_demo/src/Plugin/DemoContent/EventEnrollment.php \Drupal\social_demo\Plugin\DemoContent\EventEnrollment::getEntry()
- 8.5 modules/custom/social_demo/src/Plugin/DemoContent/EventEnrollment.php \Drupal\social_demo\Plugin\DemoContent\EventEnrollment::getEntry()
- 8.6 modules/custom/social_demo/src/Plugin/DemoContent/EventEnrollment.php \Drupal\social_demo\Plugin\DemoContent\EventEnrollment::getEntry()
- 8.8 modules/custom/social_demo/src/Plugin/DemoContent/EventEnrollment.php \Drupal\social_demo\Plugin\DemoContent\EventEnrollment::getEntry()
- 10.3.x modules/custom/social_demo/src/Plugin/DemoContent/EventEnrollment.php \Drupal\social_demo\Plugin\DemoContent\EventEnrollment::getEntry()
- 10.0.x modules/custom/social_demo/src/Plugin/DemoContent/EventEnrollment.php \Drupal\social_demo\Plugin\DemoContent\EventEnrollment::getEntry()
- 10.1.x modules/custom/social_demo/src/Plugin/DemoContent/EventEnrollment.php \Drupal\social_demo\Plugin\DemoContent\EventEnrollment::getEntry()
- 10.2.x modules/custom/social_demo/src/Plugin/DemoContent/EventEnrollment.php \Drupal\social_demo\Plugin\DemoContent\EventEnrollment::getEntry()
Makes an array with data of an entity.
Parameters
array $item: Array with items.
Return value
array Returns an array.
Overrides DemoEntity::getEntry
File
- modules/
custom/ social_demo/ src/ Plugin/ DemoContent/ EventEnrollment.php, line 22
Class
- EventEnrollment
- EventEnrollment Plugin for demo content.
Namespace
Drupal\social_demo\Plugin\DemoContentCode
public function getEntry(array $item) {
$uid = $this
->loadByUuid('user', $item['uid'])
->id();
$entry = parent::getEntry($item);
return $entry + [
'langcode' => $item['langcode'],
'name' => substr($item['title'], 0, 50),
'user_id' => $uid,
'created' => \Drupal::time()
->getRequestTime(),
'field_event' => $this
->loadByUuid('node', $item['field_event'])
->id(),
'field_enrollment_status' => $item['field_enrollment_status'],
'field_account' => $uid,
];
}