Class: Blacklight::Configuration::SessionTrackingConfig

Inherits:
OpenStructWithHashAccess show all
Defined in:
lib/blacklight/configuration/session_tracking_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OpenStructWithHashAccess

#deep_dup, #deep_transform_values, #merge, #merge!, #reverse_merge, #select, #sort_by, #sort_by!, #to_h, #try

Constructor Details

#initialize(property_hash = {}) ⇒ SessionTrackingConfig

Returns a new instance of SessionTrackingConfig.



12
13
14
# File 'lib/blacklight/configuration/session_tracking_config.rb', line 12

def initialize(property_hash = {})
  super({ storage: 'server' }.merge(property_hash))
end

Instance Attribute Details

#applied_params_componentClass

Returns component class used to render a facet group.

Returns:

  • (Class)

    component class used to render a facet group



12
13
14
# File 'lib/blacklight/configuration/session_tracking_config.rb', line 12

def initialize(property_hash = {})
  super({ storage: 'server' }.merge(property_hash))
end

#item_pagination_componentClass

Returns component class used to render the constraints.

Returns:

  • (Class)

    component class used to render the constraints



12
13
14
# File 'lib/blacklight/configuration/session_tracking_config.rb', line 12

def initialize(property_hash = {})
  super({ storage: 'server' }.merge(property_hash))
end

#storageString, FalseClass

Returns ‘server’: use server-side tracking; ‘client’: delegate search tracking and prev/next navigation to client.

Returns:

  • (String, FalseClass)

    ‘server’: use server-side tracking; ‘client’: delegate search tracking and prev/next navigation to client



12
13
14
# File 'lib/blacklight/configuration/session_tracking_config.rb', line 12

def initialize(property_hash = {})
  super({ storage: 'server' }.merge(property_hash))
end

Instance Method Details

#default_applied_params_component(storage) ⇒ Object



28
29
30
31
32
# File 'lib/blacklight/configuration/session_tracking_config.rb', line 28

def default_applied_params_component(storage)
  return Blacklight::SearchContext::ServerAppliedParamsComponent if storage == 'server'

  nil
end

#default_item_pagination_component(storage) ⇒ Object



34
35
36
37
38
# File 'lib/blacklight/configuration/session_tracking_config.rb', line 34

def default_item_pagination_component(storage)
  return Blacklight::SearchContext::ServerItemPaginationComponent if storage == 'server'

  nil
end

#default_url_helper(_storage) ⇒ Object

extension point for alternative storage types



41
42
43
# File 'lib/blacklight/configuration/session_tracking_config.rb', line 41

def default_url_helper(_storage)
  nil
end

#url_helperObject



24
25
26
# File 'lib/blacklight/configuration/session_tracking_config.rb', line 24

def url_helper
  super || default_url_helper(storage)
end