0'; } else { $where = 'del_flg = 0'; } $objQuery->setOption('ORDER BY rank DESC'); $arrCategory = $objQuery->select($col, $from, $where); if ($cid_to_key) { // 配列のキーをカテゴリーIDに $arrTmp = array(); foreach ($arrCategory as $category) { $arrTmp[$category['category_id']] = $category; } $arrCategory =& $arrTmp; unset($arrTmp); } return $arrCategory; } /** * カテゴリーツリーの取得. * * @param boolean $count_check 登録商品数をチェックする場合はtrue * @return type */ public function getTree($count_check = FALSE) { $arrList = $this->getList($count_check); $arrTree = SC_Utils_Ex::buildTree('category_id', 'parent_category_id', LEVEL_MAX, $arrList); return $arrTree; } }