protected function getCategoryMenuOptions($obCategoryList)
    {
        if (empty($obCategoryList) || $obCategoryList->isEmpty()) {
            return null;
        }

        $arResult = [];
        foreach ($obCategoryList as $obCategory) {
            if ($obCategory->children->isEmpty()) {
                $arResult[$obCategory->id] = $obCategory->name;
            } else {
                $arResult[$obCategory->id] = [
                    'title' => $obCategory->name,
                    'items' => $this->getCategoryMenuOptions($obCategory->children),
                ];
            }
        }

        return $arResult;
    }