@plentymarkets/shop-api / categoryTreeGetters
Variable: categoryTreeGetters ​
const
categoryTreeGetters:object
Type declaration ​
findCategoriesPathByCategoryId() ​
findCategoriesPathByCategoryId: (
categories
,id
,path
) =>CategoryTreeItem
[]
Parameters ​
• categories: CategoryTreeItem
[]
• id: number
• path: CategoryTreeItem
[] = []
Returns ​
findCategoryById() ​
findCategoryById: (
categories
,categoryId
) =>CategoryTreeItem
|null
Parameters ​
• categories: CategoryTreeItem
[]
• categoryId: number
Returns ​
CategoryTreeItem
| null
findCategoryBySlug() ​
findCategoryBySlug: (
categories
,slug
) =>CategoryTreeItem
|null
Parameters ​
• categories: CategoryTreeItem
[]
• slug: string
Returns ​
CategoryTreeItem
| null
findCategoryBySlugs() ​
findCategoryBySlugs: (
categories
,slugs
) =>CategoryTreeItem
|undefined
Parameters ​
• categories: CategoryTreeItem
[]
• slugs: string
[]
Returns ​
CategoryTreeItem
| undefined
generateBreadcrumbFromCategory() ​
generateBreadcrumbFromCategory: (
tree
,categoryId
) =>Breadcrumb
[]
Parameters ​
• tree: CategoryTreeItem
[]
• categoryId: number
Returns ​
generateCategoryLink() ​
generateCategoryLink: (
tree
,node
,startStr
) =>string
Parameters ​
• tree: CategoryTreeItem
[]
• node: CategoryTreeItem
• startStr: string
= ''
Returns ​
string
getCategoryDetails() ​
getCategoryDetails: (
details
) =>CategoryTreeItemDetails
|null
Parameters ​
• details: CategoryTreeItemDetails
[]
Returns ​
CategoryTreeItemDetails
| null
getCount() ​
getCount: (
category
) =>number
Parameters ​
• category: CategoryTreeItem
Returns ​
number
getId() ​
getId: (
categoryTreeItem
) =>number
Parameters ​
• categoryTreeItem: CategoryTreeItem
Returns ​
number
getItems() ​
getItems: (
category
) =>CategoryTreeItem
[]
Parameters ​
• category: CategoryTreeItem
Returns ​
getMappedBreadcrumbs() ​
getMappedBreadcrumbs: (
categories
,categoryId
,prefix
) =>Breadcrumb
[]
Parameters ​
• categories: CategoryTreeItem
[]
• categoryId: number
• prefix: string
= ''
Returns ​
getName() ​
getName: (
category
) =>string
Parameters ​
• category: CategoryTreeItem
Returns ​
string
getSlug() ​
getSlug: (
category
) =>string
Parameters ​
• category: CategoryTreeItem
Returns ​
string
getTree() ​
getTree: (
categories
) =>CategoryTreeItem
[]
Parameters ​
• categories: CategoryTreeItem
[]
Returns ​
getTreeItem() ​
getTreeItem: (
category
) =>CategoryTreeItem
|null
Parameters ​
• category: CategoryTreeItem
Returns ​
CategoryTreeItem
| null