@@ -17,7 +17,9 @@ def has_facet_values? fields = facet_field_names, response = nil
17
17
'8.0.0' )
18
18
response = @response
19
19
end
20
- facets_from_request ( fields , response ) . any? { |display_facet | should_render_facet? ( display_facet ) }
20
+ Deprecation . silence ( Blacklight ::FacetsHelperBehavior ) do
21
+ facets_from_request ( fields , response ) . any? { |display_facet | should_render_facet? ( display_facet ) }
22
+ end
21
23
end
22
24
23
25
##
@@ -61,7 +63,6 @@ def render_facet_partials fields = nil, options = {}
61
63
# @return [String]
62
64
def render_facet_limit ( display_facet , options = { } )
63
65
field_config = facet_configuration_for_field ( display_facet . name )
64
- return unless should_render_facet? ( display_facet , field_config )
65
66
66
67
if field_config . component
67
68
component = field_config . component == true ? Blacklight ::FacetFieldListComponent : field_config . component
@@ -76,6 +77,9 @@ def render_facet_limit(display_facet, options = {})
76
77
Deprecation . warn ( Blacklight ::FacetsHelperBehavior , 'Calling #render_facet_limit on a non-componentized' \
77
78
' facet is deprecated and will be removed in Blacklight 8' )
78
79
80
+ Deprecation . silence ( Blacklight ::FacetsHelperBehavior ) do
81
+ return unless should_render_facet? ( display_facet , field_config )
82
+ end
79
83
options = options . dup
80
84
options [ :partial ] ||= facet_partial_name ( display_facet )
81
85
options [ :layout ] ||= "facet_layout" unless options . key? ( :layout )
@@ -129,6 +133,7 @@ def should_render_facet? display_facet, facet_config = nil
129
133
facet_config ||= facet_configuration_for_field ( display_facet . name )
130
134
should_render_field? ( facet_config , display_facet )
131
135
end
136
+ deprecation_deprecate :should_render_facet?
132
137
133
138
##
134
139
# Determine whether a facet should be rendered as collapsed or not.
@@ -164,10 +169,6 @@ def facet_field_presenter(facet_config, display_facet)
164
169
Blacklight ::FacetFieldPresenter . new ( facet_config , display_facet , self )
165
170
end
166
171
167
- def facet_item_presenter ( facet_config , facet_item , facet_field )
168
- Blacklight ::FacetItemPresenter . new ( facet_item , facet_config , self , facet_field )
169
- end
170
-
171
172
##
172
173
# Standard display of a facet value in a list. Used in both _facets sidebar
173
174
# partial and catalog/facet expanded list. Will output facet value name as
@@ -282,6 +283,10 @@ def facet_value_for_facet_item item
282
283
end
283
284
end
284
285
286
+ def facet_item_presenter ( facet_config , facet_item , facet_field )
287
+ Blacklight ::FacetItemPresenter . new ( facet_item , facet_config , self , facet_field )
288
+ end
289
+
285
290
def facet_item_component ( facet_config , facet_item , facet_field , **args )
286
291
component = facet_config . fetch ( :item_component , Blacklight ::FacetItemComponent )
287
292
component . new ( facet_item : facet_item_presenter ( facet_config , facet_item , facet_field ) , **args ) . with_view_context ( self )
0 commit comments