CoolCMS API

LoadingTrait

Returns {@see ParameterFormItem}[] with per-category resolved values.

For the filter required is always false (search mode does not use required) and parameters are included only if at least one category has useInSearch=true in the rel; order and groupId are taken from the winning category.

Table of Contents

Methods

buildContext()  : void
getCurrentCategory()  : Category|null
loadParameterGroups()  : array<string|int, mixed>
loadParameters()  : array<string|int, ParameterFormItem>
aggregateCategoryParameterRels()  : array<int, array{order: int, groupId: ?int}>
The filter has a single category (from the presenter), but the interface is kept similar to `AdvertForm::aggregateCategoryParameterRels()`: if the filter ever handles several categories (for example a multi-category list), the aggregation rules are here: - useInSearch: a parameter is not included at all when all its rels have it false - order: MIN, groupId: first wins

Methods

loadParameterGroups()

protected loadParameterGroups() : array<string|int, mixed>
Return values
array<string|int, mixed>

aggregateCategoryParameterRels()

The filter has a single category (from the presenter), but the interface is kept similar to `AdvertForm::aggregateCategoryParameterRels()`: if the filter ever handles several categories (for example a multi-category list), the aggregation rules are here: - useInSearch: a parameter is not included at all when all its rels have it false - order: MIN, groupId: first wins

private aggregateCategoryParameterRels(Category $category) : array<int, array{order: int, groupId: ?int}>
Parameters
$category : Category
Return values
array<int, array{order: int, groupId: ?int}>
On this page

Search results