item_type = $item_type; $this->item_id = $item_id; } protected function extendedFilterOptions() : array { return [ // empty for now ]; } protected function _buildQueryConditionExtend(array $filter_condition) : ?array { $catCondition = []; $bind_types = []; $bind_values = []; if($this->item_type) { $catCondition[] = " AND `item_type` = ? "; $bind_types[] = 's'; $bind_values[] = $this->item_type; } if($this->item_id) { $catCondition[] = " AND `item_id` = ? "; $bind_types[] = 'd'; $bind_values[] = $this->item_id; } if(isset($filter_condition["item_type"]) && $filter_condition["item_type"]){ $catCondition[] = " AND `item_type` = ? "; $bind_types[] = 's'; $bind_values[] = $filter_condition["item_type"]; } if(isset($filter_condition["item_id"]) && $filter_condition["item_id"]){ $catCondition[] = " AND `item_id` = ? "; $bind_types[] = 's'; $bind_values[] = $filter_condition["item_id"]; } if(isset($filter_condition["file_type"]) && $filter_condition["file_type"]){ $catCondition[] = " AND `file_type` = ? "; $bind_types[] = 's'; $bind_values[] = $filter_condition["file_type"]; } return array( join(" ", $catCondition), $bind_types, $bind_values); } }