Class: Blacklight::Configuration::SessionTrackingConfig
- Inherits:
-
OpenStructWithHashAccess
- Object
- OpenStruct
- OpenStructWithHashAccess
- Blacklight::Configuration::SessionTrackingConfig
- Defined in:
- lib/blacklight/configuration/session_tracking_config.rb
Instance Attribute Summary collapse
-
#applied_params_component ⇒ Class
Component class used to render a facet group.
-
#item_pagination_component ⇒ Class
Component class used to render the constraints.
-
#storage ⇒ String, FalseClass
‘server’: use server-side tracking; ‘client’: delegate search tracking and prev/next navigation to client.
Instance Method Summary collapse
- #default_applied_params_component(storage) ⇒ Object
- #default_item_pagination_component(storage) ⇒ Object
-
#default_url_helper(_storage) ⇒ Object
extension point for alternative storage types.
-
#initialize(property_hash = {}) ⇒ SessionTrackingConfig
constructor
A new instance of SessionTrackingConfig.
- #url_helper ⇒ Object
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_component ⇒ Class
Returns 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_component ⇒ Class
Returns 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 |
#storage ⇒ String, FalseClass
Returns ‘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_helper ⇒ Object
24 25 26 |
# File 'lib/blacklight/configuration/session_tracking_config.rb', line 24 def url_helper super || default_url_helper(storage) end |