protected function StateFlowScheduleOverride::processOverrides in State Machine 7.3
Process the raw override results to return a list.
Return value
array An array of override revision_ids.
1 call to StateFlowScheduleOverride::processOverrides()
- StateFlowScheduleOverride::getOverrides in modules/
state_flow_schedule/ lib/ Drupal/ state_flow_schedule/ StateFlowScheduleOverride.php - Returns a list of vid's to override the default vids to load.
File
- modules/
state_flow_schedule/ lib/ Drupal/ state_flow_schedule/ StateFlowScheduleOverride.php, line 37 - SPS (Site Preview Sytem) integration for state flow schedule.
Class
Namespace
Drupal\state_flow_scheduleCode
protected function processOverrides() {
$list = array();
foreach ($this->results as $key => $result) {
if (isset($result['entity_id'])) {
$result = array(
$result,
);
}
foreach ($result as $sub => $row) {
$transform = array();
$transform['id'] = $row['entity_id'];
$transform['type'] = $row['entity_type'];
$transform['revision_id'] = $row['revision_id'] == 0 ? NULL : $row['revision_id'];
$transform['status'] = $row['revision_id'] > 0 ? 1 : 0;
$list[$row['entity_type'] . '-' . $row['entity_id']] = $transform;
}
}
return $list;
}