Adventure Documentation

ProductFilterController extends ProductCommonController
in package

This controller acts as a support controller for the product filter.

Returns a collection of FilterVariant entities.

Tags
see
FilterVariant

Main entity of collection

Table of Contents

__construct()  : mixed
filterCachedProduct()  : bool
Filter products from cache.
filterCustomDataGroups()  : array<string|int, mixed>
Support method for the product filter
filterVariantGroups()  : array<string|int, mixed>
Support method for the product filter
filterVariants()  : array<string|int, FilterVariant>
Support method for the collection. Generate a list of filtered variants
formatFilterSetting()  : mixed
Format settings for filter
getFilterMap()  : array<string|int, mixed>
Return FilterMap
getPaymentOptions()  : mixed
Legacy, do not use this method
getUnitTitle()  : string
Get the title of a product entity
isVisibleInCategory()  : bool
Support method for the product filter.
postProcess()  : mixed
Post process products.
preparePostProcess()  : mixed
Prepare post process of products.

Methods

__construct()

public __construct([mixed $parseUriParameters = false ][, mixed $filterData = false ]) : mixed
Parameters
$parseUriParameters : mixed = false
$filterData : mixed = false
Tags
Return values
mixed

filterCachedProduct()

Filter products from cache.

public filterCachedProduct(mixed &$cachedProduct, mixed $key) : bool
  • Populate cache products with data fra database
  • Add product data to filter metaphone
  • Filter out unwanted products
Parameters
$cachedProduct : mixed
$key : mixed
Tags
Return values
bool

Return true if product belong in final set

filterCustomDataGroups()

Support method for the product filter

public filterCustomDataGroups(mixed $params[, mixed $settings = null ]) : array<string|int, mixed>
Parameters
$params : mixed
$settings : mixed = null
Tags
Return values
array<string|int, mixed>

List of filter custom data groups

filterVariantGroups()

Support method for the product filter

public filterVariantGroups(mixed $params[, mixed $settings = null ]) : array<string|int, mixed>
Parameters
$params : mixed
$settings : mixed = null
Tags
Return values
array<string|int, mixed>

List of filter variant groups

filterVariants()

Support method for the collection. Generate a list of filtered variants

public filterVariants(mixed $params, mixed $settings) : array<string|int, FilterVariant>
Parameters
$params : mixed
$settings : mixed
Tags
see
FilterVariant

Main entity

Return values
array<string|int, FilterVariant>

formatFilterSetting()

Format settings for filter

public formatFilterSetting(string $value, int $categoryId) : mixed
Parameters
$value : string
$categoryId : int
Tags
Return values
mixed

getFilterMap()

Return FilterMap

public getFilterMap([array<string|int, mixed> $filterParams = [] ]) : array<string|int, mixed>
Parameters
$filterParams : array<string|int, mixed> = []

Additional parameters for filter processing

Tags
Return values
array<string|int, mixed>

FilterMap

getPaymentOptions()

Legacy, do not use this method

public getPaymentOptions(mixed $Price) : mixed
Parameters
$Price : mixed
Tags
Return values
mixed

getUnitTitle()

Get the title of a product entity

public getUnitTitle(mixed $UnitId[, mixed $LanguageIso = null ]) : string
Parameters
$UnitId : mixed
$LanguageIso : mixed = null
Tags
Return values
string

isVisibleInCategory()

Support method for the product filter.

public isVisibleInCategory(mixed $haystack, mixed $needle) : bool

Use this method to see if a given group is valid for a given category

Parameters
$haystack : mixed
$needle : mixed
Tags
Return values
bool

postProcess()

Post process products.

public postProcess(mixed $products) : mixed
  • Determine which filter settings to enable/disable
Parameters
$products : mixed
Tags
Return values
mixed

preparePostProcess()

Prepare post process of products.

public preparePostProcess(mixed $products) : mixed
  • Determine which data, categories, brands etc. that are enabled.
Parameters
$products : mixed
Tags
Return values
mixed

        

Search results