Sha256: 9da6c19104483935376f9fd1e1299be6c5d69cb8b784dbe75e3f404323b8e90f

Contents?: true

Size: 557 Bytes

Versions: 21

Compression:

Stored size: 557 Bytes

Contents

# frozen_string_literal: true

module Blacklight::FacetsHelperBehavior
  delegate :facet_configuration_for_field, to: :blacklight_config

  def facet_field_presenter(facet_config, display_facet)
    facet_config.presenter.new(facet_config, display_facet, self)
  end

  private

  def facet_value_for_facet_item item
    if item.respond_to? :value
      item.value
    else
      item
    end
  end

  def facet_item_presenter(facet_config, facet_item, facet_field)
    facet_config.item_presenter.new(facet_item, facet_config, self, facet_field)
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
blacklight-8.6.1 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.6.0 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.5.1 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.5.0 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.4.0 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.3.0 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.2.2 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.2.1 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.2.0 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.1.0 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.0.1 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.0.0 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.0.0.beta8 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.0.0.beta7 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.0.0.beta6 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.0.0.beta5 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.0.0.beta4 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.0.0.beta3 app/helpers/blacklight/facets_helper_behavior.rb
blacklight-8.0.0.beta2 app/helpers/blacklight/facets_helper_behavior.rb