Class: Blacklight::FacetCheckboxItemPresenter
- Inherits:
-
FacetItemPresenter
- Object
- FacetItemPresenter
- Blacklight::FacetCheckboxItemPresenter
- Defined in:
- app/presenters/blacklight/facet_checkbox_item_presenter.rb
Instance Attribute Summary
Attributes inherited from FacetItemPresenter
#facet_config, #facet_field, #facet_item, #search_state, #view_context
Instance Method Summary collapse
-
#selected? ⇒ Boolean
Check if the query parameters have any inclusive facets with the given value.
Methods inherited from FacetItemPresenter
#add_href, #constraint_label, #field_label, #hits, #href, #initialize, #items, #label, #remove_href, #value
Constructor Details
This class inherits a constructor from Blacklight::FacetItemPresenter
Instance Method Details
#selected? ⇒ Boolean
Check if the query parameters have any inclusive facets with the given value
7 8 9 |
# File 'app/presenters/blacklight/facet_checkbox_item_presenter.rb', line 7 def selected? search_state.filter(facet_config).values(except: [:filters, :missing]).flatten.include?(value) end |