You are here

public function TeamInvitationStorage::getInvitationsToExpire in Apigee Edge 8

Returns all team_invitation entities set to expire.

Return value

\Drupal\apigee_edge_teams\Entity\TeamInvitationInterface[] An array of team_invitations entities set to expire.

Overrides TeamInvitationStorageInterface::getInvitationsToExpire

File

modules/apigee_edge_teams/src/Entity/Storage/TeamInvitationStorage.php, line 158

Class

TeamInvitationStorage
Storage handler for team_invitation.

Namespace

Drupal\apigee_edge_teams\Entity\Storage

Code

public function getInvitationsToExpire() : array {
  $query = $this
    ->getQuery()
    ->condition('expiry', $this->time
    ->getCurrentTime(), '<')
    ->condition('status', TeamInvitationInterface::STATUS_PENDING);
  $ids = $query
    ->execute();
  return $this
    ->loadMultiple(array_values($ids));
}