ViFilterItemCategory

open class ViFilterItemCategory : ViFilterItem

The multiple selection category filter

  • return the filter type i.e. category filter

    Declaration

    Swift

    public override var filterType : ViFilterItemType
  • all category options

    Declaration

    Swift

    public var options : [ViFilterItemCategoryOption] = []
  • selected catory options

    Declaration

    Swift

    public var selectedOptions : [ViFilterItemCategoryOption] = []
  • Constructor for category filter

    • Parameters:
      • title: display category name e.g. brand
      • schemaMapping: schema mapping for this category field
      • options: The list of category options/values

    Declaration

    Swift

    public convenience init(title: String, schemaMapping: String , options: [ViFilterItemCategoryOption])

    Parameters

    title

    display category name e.g. brand

    schemaMapping

    schema mapping for this category field

    options

    The list of category options/values

  • Check if all options are selected. If user has not selected any options (the default) , this will return true

    Returns

    true if all options or none of the options is selected. False otherwise

    Declaration

    Swift

    open func isAllSelected() -> Bool

    Return Value

    true if all options or none of the options is selected. False otherwise

  • return comma separated string for selected options for display in UI

    Declaration

    Swift

    open func getSelectedString() -> String
  • reset this filter i.e. to All

    Declaration

    Swift

    open override func reset()
  • check if the filter is already reset

    Returns

    true if filter is reset

    Declaration

    Swift

    open override func isReset() -> Bool

    Return Value

    true if filter is reset

  • Generate filter query value. See this for more details: http://developers.visenze.com/api/?shell#filtering-results

    Returns

    filter query value

    Declaration

    Swift

    open override func getFilterQueryValue() -> String

    Return Value

    filter query value

  • Clone filter item options.

    Returns

    new filter item

    Declaration

    Swift

    open override func clone() -> ViFilterItem

    Return Value

    new filter item