public function DeveloperAppStorage::loadByDeveloper in Apigee Edge 8
Loads developer apps by developer.
Parameters
string $developer_id: Developer id (UUID) or email address of a developer.
Return value
\Drupal\apigee_edge\Entity\DeveloperApp[] The array of the developer apps of the given developer.
Overrides DeveloperAppStorageInterface::loadByDeveloper
File
- src/
Entity/ Storage/ DeveloperAppStorage.php, line 108
Class
- DeveloperAppStorage
- Entity storage class for Developer app entities.
Namespace
Drupal\apigee_edge\Entity\StorageCode
public function loadByDeveloper(string $developer_id) : array {
$query = $this
->getQuery();
// We have to figure out whether this is an email or a UUID to call the
// best API endpoint that is possible.
if ($this->emailValidator
->isValid($developer_id)) {
$query
->condition('email', $developer_id);
}
else {
$query
->condition('developerId', $developer_id);
}
$ids = $query
->execute();
return $this
->loadMultiple(array_values($ids));
}