public function EventRequestActivityContext::getEventEnrollmentOwner in Open Social 10.2.x
Same name and namespace in other branches
- 8.9 modules/custom/activity_basics/src/Plugin/ActivityContext/EventRequestActivityContext.php \Drupal\activity_basics\Plugin\ActivityContext\EventRequestActivityContext::getEventEnrollmentOwner()
- 10.3.x modules/custom/activity_basics/src/Plugin/ActivityContext/EventRequestActivityContext.php \Drupal\activity_basics\Plugin\ActivityContext\EventRequestActivityContext::getEventEnrollmentOwner()
- 10.0.x modules/custom/activity_basics/src/Plugin/ActivityContext/EventRequestActivityContext.php \Drupal\activity_basics\Plugin\ActivityContext\EventRequestActivityContext::getEventEnrollmentOwner()
- 10.1.x modules/custom/activity_basics/src/Plugin/ActivityContext/EventRequestActivityContext.php \Drupal\activity_basics\Plugin\ActivityContext\EventRequestActivityContext::getEventEnrollmentOwner()
Returns event enrollment owner.
Parameters
\Drupal\social_event\EventEnrollmentInterface $event_enrollment: Event enrollment object.
array $data: The data.
Return value
array An associative array of recipients, containing the following key-value pairs:
- target_type: The entity type ID.
- target_id: The entity ID.
1 call to EventRequestActivityContext::getEventEnrollmentOwner()
- EventRequestActivityContext::getRecipients in modules/
custom/ activity_basics/ src/ Plugin/ ActivityContext/ EventRequestActivityContext.php - Returns a batched list of recipients for this context.
File
- modules/
custom/ activity_basics/ src/ Plugin/ ActivityContext/ EventRequestActivityContext.php, line 187
Class
- EventRequestActivityContext
- Provides a 'EventRequestActivityContext' activity context.
Namespace
Drupal\activity_basics\Plugin\ActivityContextCode
public function getEventEnrollmentOwner(EventEnrollmentInterface $event_enrollment, array $data) {
$recipients[] = [
'target_type' => 'user',
'target_id' => $event_enrollment
->get('field_account')
->getValue()[0]['target_id'],
];
return $recipients;
}