CategoryListTrait uses trait:short
Table of Contents
Properties
- $c : string|null
Methods
- actionList() : void
- renderList() : void
- buildPathMap() : array<int, array<int, Category>>
- Builds the map `categoryId => [ancestors from the root, the category itself]`.
- extractChars() : array<string|int, string>
- groupCategoriesByChar() : array<string, array<int, Category>>
- prepareCanonicalUrl() : void
- resolveGroupKey() : string
- Returns the group key for the name: a letter A-Z (diacritics normalized) or '#'.
Properties
$c
public
string|null
$c
= null
Attributes
- #[Persistent]
Methods
actionList()
public
actionList() : void
renderList()
public
renderList() : void
buildPathMap()
Builds the map `categoryId => [ancestors from the root, the category itself]`.
private
buildPathMap(array<string|int, Category> $categories) : array<int, array<int, Category>>
Uses the nested set: every A with A.lft < B.lft && A.rgt > B.rgt is an ancestor of category B.
Parameters
- $categories : array<string|int, Category>
Return values
array<int, array<int, Category>>extractChars()
private
extractChars(array<string|int, Category> $categories, int|null $langId) : array<string|int, string>
Parameters
- $categories : array<string|int, Category>
- $langId : int|null
Return values
array<string|int, string>groupCategoriesByChar()
private
groupCategoriesByChar(array<string|int, Category> $categories, int|null $langId) : array<string, array<int, Category>>
Parameters
- $categories : array<string|int, Category>
- $langId : int|null
Return values
array<string, array<int, Category>>prepareCanonicalUrl()
private
prepareCanonicalUrl([array<string, mixed> $resetParams = [] ]) : void
Parameters
- $resetParams : array<string, mixed> = []
resolveGroupKey()
Returns the group key for the name: a letter A-Z (diacritics normalized) or '#'.
private
resolveGroupKey(string $name) : string
Parameters
- $name : string