public function Project::getStatus in GatherContent 7.3
Description.
Parameters
int $project_id: Project ID.
int $status_id: Status ID.
Return value
array Description.
File
- includes/
Project.inc, line 172
Class
Namespace
GatherContentCode
public function getStatus($project_id, $status_id) {
if (!$this->local) {
try {
$response = $this->client
->get('/projects/' . $project_id . '/statuses/' . $status_id);
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);
}
}