public function TeamInvitationStorage::loadByRecipient in Apigee Edge 8
Returns all team_invitation entities for the provided email and team id.
Parameters
string $email: The email address.
string|null $team_id: The team id.
Return value
\Drupal\apigee_edge_teams\Entity\TeamInvitationInterface[] An array of team_invitation entities for this email address.
Overrides TeamInvitationStorageInterface::loadByRecipient
File
- modules/
apigee_edge_teams/ src/ Entity/ Storage/ TeamInvitationStorage.php, line 144
Class
- TeamInvitationStorage
- Storage handler for team_invitation.
Namespace
Drupal\apigee_edge_teams\Entity\StorageCode
public function loadByRecipient(string $email, ?string $team_id = NULL) : array {
$query = $this
->getQuery()
->condition('recipient', $email);
if ($team_id) {
$query
->condition('team', $team_id);
}
$ids = $query
->execute();
return $this
->loadMultiple(array_values($ids));
}