- Timestamp:
- 2014/05/21 13:02:52 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/helper/SC_Helper_Category.php
r23436 r23437 67 67 * カテゴリー一覧の取得. 68 68 * 69 * @param boolean $cid_to_key 配列のキーをカテゴリーIDにする場合はtrue 69 * @param bool $cid_to_key 配列のキーをカテゴリーIDにする場合はtrue 70 * @param bool $reset スタティック変数をリセットする場合はtrue 70 71 * @return array カテゴリー一覧の配列 71 72 */ 72 public function getList($cid_to_key = FALSE )73 public function getList($cid_to_key = FALSE, $reset = FALSE) 73 74 { 74 75 static $arrCategory = array(), $cidIsKey = array(); 76 77 if ($reset) { 78 $arrCategory = array(); 79 $cidIsKey = array(); 80 } 75 81 76 82 if (!isset($arrCategory[$this->count_check])) { … … 105 111 * カテゴリーツリーの取得. 106 112 * 113 * @param bool $reset スタティック変数をリセットする場合はtrue 107 114 * @return array 108 115 */ 109 public function getTree( )116 public function getTree($reset = false) 110 117 { 111 118 static $arrTree = array(); 119 120 if ($reset) { 121 $arrTree = array(); 122 } 123 112 124 if (!isset($arrTree[$this->count_check])) { 113 $arrList = $this->getList( );125 $arrList = $this->getList(false, $reset); 114 126 $arrTree[$this->count_check] = SC_Utils_Ex::buildTree('category_id', 'parent_category_id', LEVEL_MAX, $arrList); 115 127 }
Note: See TracChangeset
for help on using the changeset viewer.