public function SJB_CategorySearcher_Tree($field) { parent::SJB_AbstractCategorySearcher($field); $this->tree_values = SJB_ListingFieldTreeManager::getTreeValuesAsArrayWithChildBySID($field['sid']); $this->parent = array_keys($this->tree_values); $this->field = $field; }
protected function _get_Captions_with_Counts_Grouped_by_Captions($request_data, array $listingSids = array()) { if (SJB_Settings::getValue('enableBrowseByCounter')) { $res = parent::_get_Captions_with_Counts_Grouped_by_Captions($request_data, $listingSids); } else { $sql = "select `value` as caption from `listing_field_list` where `field_sid`=?n"; $res = SJB_DB::query($sql, $this->field['sid']); } return $res; }
protected function _get_Captions_with_Counts_Grouped_by_Captions($request_data, array $listingSids = array()) { if (SJB_Settings::getValue('enableBrowseByCounter')) { $res = parent::_get_Captions_with_Counts_Grouped_by_Captions($request_data, $listingSids); foreach ($res as $key => $value) { if (strpos($key, ',')) { unset($res[$key]); $newKeys = explode(',', $key); foreach ($newKeys as $newKey) { $res[$newKey] = isset($res[$newKey]) ? $res[$newKey] + $value : $value; } } } } else { $sql = "select `value` as caption from `listing_field_list` where `field_sid`=?n"; $res = SJB_DB::query($sql, $this->field['sid']); } return $res; }
function SJB_CategorySearcher_Value($field) { parent::SJB_AbstractCategorySearcher($field); }