protected function ContributeManager::getOrganization in Contribute 8
An organization's information from Drupal.org.
Return value
array An organization's information from Drupal.org.
4 calls to ContributeManager::getOrganization()
- ContributeManager::getAccount in src/
ContributeManager.php - Get account status.
- ContributeManager::getContribution in src/
ContributeManager.php - Get contribution status.
- ContributeManager::getOrganizationBadge in src/
ContributeManager.php - Get an organization's membership badge from Drupal.org.
- ContributeManager::getOrganizationLogo in src/
ContributeManager.php - Get an organization's logo from Drupal.org.
File
- src/
ContributeManager.php, line 545
Class
- ContributeManager
- Class ContributeManager.
Namespace
Drupal\contributeCode
protected function getOrganization() {
$account_id = $this
->getAccountId();
$data = $this
->get('https://www.drupal.org/api-d7/node.json?type=organization&title=' . urlencode($account_id));
if (isset($data['list']) && count($data['list']) === 1) {
return reset($data['list']);
}
else {
return [];
}
}