// CategoryIDs returns hierarchized category ids from top level category id to current category id
CategoryIDs returns hierarchized category ids from top level category id to current category id
// CategoryIDs returns hierarchized category ids from top level category id to current category id
func (i *ItemCategoryWithParent) CategoryIDs() []string {
	categoryIDs := []string{i.ID}
	parentCategory := i.Parent
	for parentCategory != nil {
		categoryIDs = append([]string{parentCategory.ID}, categoryIDs...)
		parentCategory = parentCategory.Parent
	}
	return categoryIDs
}
func ( i * ItemCategoryWithParent ) CategoryIDs ( ) [ ] string { categoryIDs := [ ] string { i . ID } parentCategory := i . Parent for parentCategory != nil { categoryIDs = append ( [ ] string { parentCategory . ID } , categoryIDs ... ) parentCategory = parentCategory . Parent } return categoryIDs }
CategoryIDs returns hierarchized category ids from top level category id to current category id
CategoryIDs returns hierarchized category ids from top level category id to current category id