You are here

public function ExportEnrolments::getAccount in Open Social 10.0.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_event/modules/social_event_enrolments_export/src/Plugin/Action/ExportEnrolments.php \Drupal\social_event_enrolments_export\Plugin\Action\ExportEnrolments::getAccount()
  2. 8.5 modules/social_features/social_event/modules/social_event_enrolments_export/src/Plugin/Action/ExportEnrolments.php \Drupal\social_event_enrolments_export\Plugin\Action\ExportEnrolments::getAccount()
  3. 8.6 modules/social_features/social_event/modules/social_event_enrolments_export/src/Plugin/Action/ExportEnrolments.php \Drupal\social_event_enrolments_export\Plugin\Action\ExportEnrolments::getAccount()
  4. 8.7 modules/social_features/social_event/modules/social_event_enrolments_export/src/Plugin/Action/ExportEnrolments.php \Drupal\social_event_enrolments_export\Plugin\Action\ExportEnrolments::getAccount()
  5. 8.8 modules/social_features/social_event/modules/social_event_enrolments_export/src/Plugin/Action/ExportEnrolments.php \Drupal\social_event_enrolments_export\Plugin\Action\ExportEnrolments::getAccount()
  6. 10.3.x modules/social_features/social_event/modules/social_event_enrolments_export/src/Plugin/Action/ExportEnrolments.php \Drupal\social_event_enrolments_export\Plugin\Action\ExportEnrolments::getAccount()
  7. 10.1.x modules/social_features/social_event/modules/social_event_enrolments_export/src/Plugin/Action/ExportEnrolments.php \Drupal\social_event_enrolments_export\Plugin\Action\ExportEnrolments::getAccount()
  8. 10.2.x modules/social_features/social_event/modules/social_event_enrolments_export/src/Plugin/Action/ExportEnrolments.php \Drupal\social_event_enrolments_export\Plugin\Action\ExportEnrolments::getAccount()

Extract user entity from event enrollment entity.

Parameters

\Drupal\social_event\EventEnrollmentInterface $entity: The event enrollment.

Return value

\Drupal\user\UserInterface The user.

1 call to ExportEnrolments::getAccount()
ExportEnrolments::executeMultiple in modules/social_features/social_event/modules/social_event_enrolments_export/src/Plugin/Action/ExportEnrolments.php
Execute action on multiple entities.

File

modules/social_features/social_event/modules/social_event_enrolments_export/src/Plugin/Action/ExportEnrolments.php, line 71

Class

ExportEnrolments
Exports a event enrollment accounts to CSV.

Namespace

Drupal\social_event_enrolments_export\Plugin\Action

Code

public function getAccount(EventEnrollmentInterface $entity) {
  $accounts = $entity->field_account
    ->referencedEntities();
  return reset($accounts);
}