public function buildTreeRole($item = NULL, $roleList = []) {
        $tree = [];
        $allParents = [];
        if (empty($roleList))
            $roleList = $this->getRoles();

        if ($item == NULL) {
            // Get all children
            $childRoles = [];
            $query = (new Query)->select(['child'])
                ->from($this->itemChildTable)
                ->where([]);
            foreach ($query->all($this->db) as $key => $value) {
                $childRoles[] = $value['child'];
            }

            // Get all roles
            $query = (new Query)->select(['name'])
                ->from($this->itemTable)
                ->where(['type' => 1]);
            foreach ($query->all($this->db) as $key => $value) {
                if (!in_array($value['name'], $childRoles))
                    $allParents[] = $value;
            }
        }
        if (!empty($allParents)) {
            foreach ($allParents as $parent) {
                $tree[$parent['name']] = [
                    'title' => $roleList[$parent['name']]->description,
                    'items' => $this->buildTreeRole($parent['name'], $roleList),
                ];
            }
        } else {
            // Get
            $childs = (new Query)->select(['child'])
                ->from($this->itemChildTable)
                ->where(['parent' => $item])
                ->all($this->db);

            // lấy ra name của các role gán vào mảng mới.
            $checkRole = [];
            foreach ($roleList as $v) {
                $checkRole[] = $v->name;
            }

            foreach ($childs as $child) {
                // Nếu item là permission thì bỏ qua.
                if (!in_array($child['child'], $checkRole))
                    continue;
                $tree[$child['child']] = [
                    'title' => $roleList[$child['child']]->description,
                    'items' => $this->buildTreeRole($child['child'], $roleList),
                ];
            }
        }
        return $tree;
    }