public function Project::getStatuses in GatherContent 7.3
Description.
Parameters
int $project_id: Project ID.
Return value
array Description.
File
- includes/
Project.inc, line 140
Class
Namespace
GatherContentCode
public function getStatuses($project_id) {
if (!$this->local) {
try {
$response = $this->client
->get('/projects/' . $project_id . '/statuses');
if ($response
->getStatusCode() === 200) {
$data = json_decode($response
->getBody());
return $data->data;
}
} catch (\Exception $e) {
drupal_set_message($e
->getMessage(), 'error');
watchdog('gathercontent', $e
->getMessage(), array(), WATCHDOG_ERROR);
}
}
else {
drupal_set_message(t('Error occured, please contact your system administrator'), 'error');
watchdog('gathercontent', 'Object Project created as local, but trying to reach remote data.', NULL, WATCHDOG_ALERT);
}
}