예제 #1
0
 /**
  * 根据 category_id 获取该分类所有的父级数组(包括自己)
  * @param $category_id  int
  * @return array
  */
 public function get_parents_by_category_id($category_id)
 {
     $result = array();
     $category = $this->get($category_id);
     $categories = $this->load();
     $result = tree::get_parents($categories, $category_id);
     return $result;
 }