CategoryTrait
Table of Contents
Properties
- $categorySlugTranslator : CategoryNameTranslator
- Router translator, the same one that builds the slug from the id in links (see init below).
- $currentCategory : Category|null
Methods
- getCurrentCategory() : Category|null
- initCurrentCategory() : void
- isCategoryBranchActive() : bool
- Whether the category and all its ancestors are active (nested set: an ancestor encloses lft/rgt).
- prepareCategoryFilter() : void
Properties
$categorySlugTranslator
Router translator, the same one that builds the slug from the id in links (see init below).
public
CategoryNameTranslator
$categorySlugTranslator
Attributes
- #[Inject]
$currentCategory
private
Category|null
$currentCategory
= null
Methods
getCurrentCategory()
public
getCurrentCategory() : Category|null
Return values
Category|nullinitCurrentCategory()
public
initCurrentCategory() : void
isCategoryBranchActive()
Whether the category and all its ancestors are active (nested set: an ancestor encloses lft/rgt).
private
isCategoryBranchActive(Category $category) : bool
Parameters
- $category : Category
Return values
boolprepareCategoryFilter()
private
prepareCategoryFilter(array<int, Filter> &$filters) : void
Parameters
- $filters : array<int, Filter>