public function query() {
$key = reset($this->value);
$field = $this->field;
$table = $this->table;
switch ($key) {
case 'open_job_items':
$this->query
->addWhere($this->options['group'], "{$table}.{$field}", [
0,
1,
2,
], 'IN');
break;
default:
$state_definitions = JobItem::getStateDefinitions();
if ($state_definitions[$key]['type'] == 'translator_state') {
$field = 'translator_state';
}
$this->query
->addWhere($this->options['group'], "{$table}.{$field}", $key, '=');
break;
}
}