- Timestamp:
- 2011/01/13 19:57:47 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/helper/SC_Helper_DB.php
r19864 r19909 500 500 501 501 return $arrRet; 502 } 503 504 /** 505 * カテゴリツリーを走査し, パンくずリスト用の配列を生成する. 506 * 507 * @param array カテゴリの配列 508 * @param integer $parent 上位カテゴリID 509 * @param array パンくずリスト用の配列 510 * @result void 511 * @see sfGetCatTree() 512 */ 513 function findTree(&$arrTree, $parent, &$result) { 514 if ($result[count($result) - 1]['parent_category_id'] === 0) { 515 return; 516 } else { 517 foreach ($arrTree as $key => $val) { 518 if ($val['category_id'] == $parent) { 519 $result[] = array('category_id' => $val['category_id'], 520 'parent_category_id' => (int) $val['parent_category_id'], 521 'category_name' => $val['category_name']); 522 $this->findTree($arrTree, $val['parent_category_id'], $result); 523 } 524 } 525 } 502 526 } 503 527
Note: See TracChangeset
for help on using the changeset viewer.