CoolCMS API

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]

Methods

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
bool

prepareCategoryFilter()

private prepareCategoryFilter(array<int, Filter> &$filters) : void
Parameters
$filters : array<int, Filter>
On this page

Search results