ParameterTrait uses trait:short
Table of Contents
Properties
- $geocodingManager : GeocodingManager
- $addressDistanceCoordinateParamIds : array{0: ?int, 1: ?int}|null
Methods
- buildAddressDistanceFilter() : BaseFilter|null
- buildRegionSubtreeFilters() : array<string|int, BaseFilter>
- Builds the "in region" filter from the suggest picker (`REGION_PICKER`, `p[<id>]=<regionId>`): profiles whose region lies in the subtree of the chosen node, so a county also finds the profiles of its municipalities. Same shape as the list by region in the path ({@see RegionTrait::prepareRegionFilter()}). A nonexistent region adds no filter, so an invalid id from the URL does not hide the whole list.
- extractBaseParameterIds() : array<string|int, int>
- Extracts unique base `parameterId` values from the URL keys (strips the `_from`, `_to`, `_d`, `_r` suffixes).
- prepareAdvertSearchFilter() : Filter
- Builds the fulltext filter through ES (ids go into `SearchIdFilter`; visibility and pagination stay in the DB phase 1). When ES is off, down or the query is short, it falls back transparently to MySQL `MATCH_AGAINST` over `parameterRels.value`. Same approach as the Bazaar `ParameterTrait`.
- prepareParameterFilter() : void
- resolveAddressDistanceLanguageId() : int
- resolveAddressDistancePreferRegionId() : int|null
- The country of the website localization takes precedence in the dataset match (same as in the suggest).
- resolveCoordinateParamIds() : array{0: ?int, 1: ?int}
Properties
$geocodingManager
public
GeocodingManager
$geocodingManager
Attributes
- #[Inject]
$addressDistanceCoordinateParamIds
private
array{0: ?int, 1: ?int}|null
$addressDistanceCoordinateParamIds
= null
[latParamId, lonParamId], resolved once per request
Methods
buildAddressDistanceFilter()
private
buildAddressDistanceFilter(int $parameterId, array<int|string, mixed> $urlParams) : BaseFilter|null
Parameters
- $parameterId : int
- $urlParams : array<int|string, mixed>
Return values
BaseFilter|nullbuildRegionSubtreeFilters()
Builds the "in region" filter from the suggest picker (`REGION_PICKER`, `p[<id>]=<regionId>`): profiles whose region lies in the subtree of the chosen node, so a county also finds the profiles of its municipalities. Same shape as the list by region in the path ({@see RegionTrait::prepareRegionFilter()}). A nonexistent region adds no filter, so an invalid id from the URL does not hide the whole list.
private
buildRegionSubtreeFilters(int|null $parameterId, array<int|string, mixed> $urlParams) : array<string|int, BaseFilter>
Parameters
- $parameterId : int|null
- $urlParams : array<int|string, mixed>
Return values
array<string|int, BaseFilter>extractBaseParameterIds()
Extracts unique base `parameterId` values from the URL keys (strips the `_from`, `_to`, `_d`, `_r` suffixes).
private
extractBaseParameterIds(array<string|int, mixed> $urlParams) : array<string|int, int>
Parameters
- $urlParams : array<string|int, mixed>
Return values
array<string|int, int>prepareAdvertSearchFilter()
Builds the fulltext filter through ES (ids go into `SearchIdFilter`; visibility and pagination stay in the DB phase 1). When ES is off, down or the query is short, it falls back transparently to MySQL `MATCH_AGAINST` over `parameterRels.value`. Same approach as the Bazaar `ParameterTrait`.
private
prepareAdvertSearchFilter(string $search, object $language) : Filter
Parameters
- $search : string
- $language : object
-
LanguageContextreturns a real entity (never a proxy)
Return values
FilterprepareParameterFilter()
private
prepareParameterFilter(array<int, Filter> &$filters[, bool $withSearch = true ]) : void
Parameters
- $filters : array<int, Filter>
- $withSearch : bool = true
-
falseadds no fulltext filter, only the parameter filters ($_GET['p']). The search endpoint uses it: the Api side handles the search there (ES relevance,MATCH_AGAINSTfallback), so a second fulltext in the DB would be an extra query and would narrow the result differently from ES.
resolveAddressDistanceLanguageId()
private
resolveAddressDistanceLanguageId() : int
Return values
intresolveAddressDistancePreferRegionId()
The country of the website localization takes precedence in the dataset match (same as in the suggest).
private
resolveAddressDistancePreferRegionId() : int|null
Return values
int|nullresolveCoordinateParamIds()
private
resolveCoordinateParamIds() : array{0: ?int, 1: ?int}
Return values
array{0: ?int, 1: ?int} —[latParamId, lonParamId]