InitTrait uses trait:short
Table of Contents
Constants
- CHILDREN_NAVIGATION_TEMPLATE_DIR : string = __DIR__ . '/../../../Base/Front/Components/Chil...
- Shared templates (`Style_1`) for every module's children list.
Methods
- childrenNavigationTemplateDir() : string
- Module (or theme) copy of the template wins; otherwise the shared one.
-
loadChildrenNavigation()
: array{items: array
, parent: object|null} - getCurrentRegion() : Region|null
- prepareRegionChildren() : void
- regionHref() : string
- Keeps the selected category. Both segments are explicit (`-` = none) so a missing one cannot shift the other in the URL.
- regionName() : string|null
Constants
CHILDREN_NAVIGATION_TEMPLATE_DIR
Shared templates (`Style_1`) for every module's children list.
private
string
CHILDREN_NAVIGATION_TEMPLATE_DIR
= __DIR__ . '/../../../Base/Front/Components/ChildrenNavigation'
Methods
childrenNavigationTemplateDir()
Module (or theme) copy of the template wins; otherwise the shared one.
protected
childrenNavigationTemplateDir(string $ownDir, string $style) : string
Same lookup order as BaseComponent::setTemplateFile().
Parameters
- $ownDir : string
- $style : string
Return values
stringloadChildrenNavigation()
protected
loadChildrenNavigation(Manager<BaseEntity, ServiceInterface<string|int, BaseEntity>> $manager, object|null $current[, array<int, string> $includes = ['translations'] ]) : array{items: array, parent: object|null}
Parameters
- $manager : Manager<BaseEntity, ServiceInterface<string|int, BaseEntity>>
- $current : object|null
- $includes : array<int, string> = ['translations']
Return values
array{items: arraygetCurrentRegion()
private
getCurrentRegion() : Region|null
Return values
Region|nullprepareRegionChildren()
private
prepareRegionChildren(string $linkTarget, array<string, mixed> $linkParams) : void
Parameters
- $linkTarget : string
- $linkParams : array<string, mixed>
regionHref()
Keeps the selected category. Both segments are explicit (`-` = none) so a missing one cannot shift the other in the URL.
private
regionHref(string $linkTarget, array<string, mixed> $linkParams, int|null $regionId) : string
Parameters
- $linkTarget : string
- $linkParams : array<string, mixed>
- $regionId : int|null
Return values
stringregionName()
private
regionName(Region $region) : string|null
Parameters
- $region : Region