public function GatherContentCurl::getStates in GatherContent 7.2
Get list of workflow states.
File
- includes/
curl.inc, line 176 - Contains functions used to process and retrieve data from GatherContent.
Class
- GatherContentCurl
- @file Contains functions used to process and retrieve data from GatherContent.
Code
public function getStates() {
$states = $this
->get('get_custom_states_by_project', array(
'id' => variable_get('gathercontent_project_id'),
));
$new_states = array();
if ($states && $this
->foreachSafe($states->custom_states)) {
foreach ($states->custom_states as $state) {
$new_states[$state->id] = (object) array(
'name' => $state->name,
'color_id' => $state->color_id,
'position' => $state->position,
);
}
@uasort($new_states, array(
&$this,
'sortPages',
));
}
$this->data['states'] = $new_states;
}