InitRenderTrait
Table of Contents
Constants
- TYPE_PARAMETER_KEY : mixed = 'type'
- Key of the parameter that carries the advert type. Options are its children in the tree.
Methods
- findTypeParameterId() : int|null
- Id of the `type` parameter (not an option id). The parameter may be missing in the data; then the type filter is silently not added and the list does not fail.
- initializeRender() : void
- prepareAdvertFilters() : array<int, BaseFilter>
- Visibility conditions of the list.
Constants
TYPE_PARAMETER_KEY
Key of the parameter that carries the advert type. Options are its children in the tree.
private
mixed
TYPE_PARAMETER_KEY
= 'type'
Methods
findTypeParameterId()
Id of the `type` parameter (not an option id). The parameter may be missing in the data; then the type filter is silently not added and the list does not fail.
private
findTypeParameterId() : int|null
Return values
int|nullinitializeRender()
private
initializeRender([int $maxNumber = 6 ][, int|null $typeOptionId = null ]) : void
Parameters
- $maxNumber : int = 6
- $typeOptionId : int|null = null
prepareAdvertFilters()
Visibility conditions of the list.
private
prepareAdvertFilters([int|null $typeOptionId = null ]) : array<int, BaseFilter>
Same logic as TopAdvertList: when the
presenter has prepareFilters(), it rules (respects category, region and rights).
Otherwise a safe default set applies, intentionally fail-closed, so no deleted, banned,
unpaid or sold advert reaches the main page.
Parameters
- $typeOptionId : int|null = null