Ejemplo n.º 1
0
 /**
  * カテゴリーツリーの取得.
  *
  * @param bool $reset スタティック変数をリセットする場合はtrue
  * @return array
  */
 public function getTree($reset = false)
 {
     static $arrTree = array();
     if ($reset) {
         $arrTree = array();
     }
     if (!isset($arrTree[$this->count_check])) {
         $arrList = $this->getList(false, $reset);
         $arrTree[$this->count_check] = Utils::buildTree('category_id', 'parent_category_id', LEVEL_MAX, $arrList);
     }
     return $arrTree[$this->count_check];
 }