REQUEST A LIVE DEMO

Search Customizer

dragonGlass.SearchCustomizer

Description:

Adapts the data returned from DragonGlass to the needs of the view. The SearchCustomizer is an interface which provides a standard way for DragonGlass to transform the data before it is returned to the calling code. If you don't provide a customizer, DragonGlass uses the default implementation which does nothing.

Constructor

    
new SearchCustomizer()

Methods

    
onResultsLoaded()

Fires:

event:dg-before-facet-search
event:dg-facet-results-loaded


    
getRequiredFieldsForQuery(query) -> {array}

Parameters:

Name Type
query object

Returns:

array of field names


    
normalizeRow(data) -> {object}

Parameters:

Name Type
data object

Returns:

the transformed data