You are here

public function TeamMemberRoleStorage::loadByDeveloper in Apigee Edge 8

Loads all team roles of a developer within all its teams.

WARNING: The fact whether the developer is actually member of the team (company) in Apigee Edge is not being verified here. The caller should perform this check if needed. Thanks for this approach we can minimize the API calls that are being sent to Apigee Edge.

Parameters

\Drupal\Core\Session\AccountInterface $account: User entity object of a developer.

Return value

\Drupal\apigee_edge_teams\Entity\TeamMemberRoleInterface[] Array of team member role objects.

Overrides TeamMemberRoleStorageInterface::loadByDeveloper

File

modules/apigee_edge_teams/src/Entity/Storage/TeamMemberRoleStorage.php, line 128

Class

TeamMemberRoleStorage
Entity storage class for team member role entities.

Namespace

Drupal\apigee_edge_teams\Entity\Storage

Code

public function loadByDeveloper(AccountInterface $account) : array {
  return $this
    ->loadByProperties([
    'uid' => $account
      ->id(),
  ]);
}