You are here

public function EventEnrollmentStatusHelper::eventEnrollments in Open Social 10.2.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_event/src/EventEnrollmentStatusHelper.php \Drupal\social_event\EventEnrollmentStatusHelper::eventEnrollments()
  2. 10.3.x modules/social_features/social_event/src/EventEnrollmentStatusHelper.php \Drupal\social_event\EventEnrollmentStatusHelper::eventEnrollments()
  3. 10.0.x modules/social_features/social_event/src/EventEnrollmentStatusHelper.php \Drupal\social_event\EventEnrollmentStatusHelper::eventEnrollments()
  4. 10.1.x modules/social_features/social_event/src/EventEnrollmentStatusHelper.php \Drupal\social_event\EventEnrollmentStatusHelper::eventEnrollments()

Custom check to get all enrollments for an event.

Parameters

int $event: The event id you want to check on.

int $invite_status: The event status to filter on.

Return value

array Returns the conditions for which to search event enrollments on.

1 call to EventEnrollmentStatusHelper::eventEnrollments()
EventEnrollmentStatusHelper::getAllEventEnrollments in modules/social_features/social_event/src/EventEnrollmentStatusHelper.php
Custom check to get all enrollments for an event.

File

modules/social_features/social_event/src/EventEnrollmentStatusHelper.php, line 127

Class

EventEnrollmentStatusHelper
Class EventEnrollmentStatusHelper.

Namespace

Drupal\social_event

Code

public function eventEnrollments($event, $invite_status = NULL) {
  $nid = $this->routeMatch
    ->getRawParameter('node');
  if ($event) {
    $nid = $event;
  }

  // If there is no trigger get the enrollment for the current user.
  $conditions = [
    'field_event' => $nid,
    'field_request_or_invite_status' => EventEnrollmentInterface::INVITE_PENDING_REPLY,
  ];
  return $conditions;
}