SearchOptions

Helper class for getting item search options

Namespace

Ceres\Helper

Constants
Type Name Value Description

string

SCOPE_SEARCH

'search'

string

SCOPE_CATEGORY

'category'

array

TRANSLATION_MAP

['itemRecommendedSorting','itemName_asc','itemName_desc','itemPrice_asc','itemPrice_desc','itemVariationCreateTimestamp_desc','itemVariationCreateTimestamp_asc','itemAvailabilityAverageDays_asc','itemAvailabilityAverageDays_desc','itemVariationCustomNumber_asc','itemVariationCustomNumber_desc','itemVariationLastUpdateTimestamp_asc','itemVariationLastUpdateTimestamp_desc','itemProducerName_asc','itemProducerName_desc','itemRelevance','itemRandom','itemVariationTopseller_asc','itemVariationTopseller_desc']

Properties
Type Name Description

array

$itemsPerPage

Get all itemsPerPage settings

int

$defaultItemsPerPage

Get the default itemsPerPage setting

array

$sorting

Get all sorting settings

string

$defaultSorting

Get the default sorting setting

Methods
public static get($scope):SearchOptions

Get an instance of the class containing item search options for the scope

Parameters

Type

Name

Description

string

$scope

Either 'category' or 'search'

public static validateItemListOptions($itemListOptions, $scope):mixed

Validate an array of item search options inputted by user.

Parameters

Type

Name

Description

array

$itemListOptions

User inputted item search options.

string

$scope

The scope of the item search options.