public function load()
{
$workflowStateData = $this->db->fetchAll("SELECT cid, ctype, workflowId FROM element_workflow_state" . $this->getCondition() . $this->getOrder() . $this->getOffsetLimit(), $this->model->getConditionVariables());
$workflowStates = [];
foreach ($workflowStateData as $entry) {
if ($workflowState = Model\Element\WorkflowState::getByPrimary($entry['cid'], $entry['ctype'], $entry['workflowId'])) {
$workflowStates[] = $workflowState;
}
}
$this->model->setWorkflowStates($workflowStates);
return $workflowStates;
}