Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 4
0
 function SJB_CategorySearcher_Value($field)
 {
     parent::SJB_AbstractCategorySearcher($field);
 }