Class: Blacklight::SearchContextComponent
- Inherits:
-
Component
- Object
- ViewComponent::Base
- Component
- Blacklight::SearchContextComponent
show all
- Defined in:
- app/components/blacklight/search_context_component.rb
Instance Method Summary
collapse
Methods inherited from Component
reset_compiler!, sidecar_files, upstream_sidecar_files
Constructor Details
#initialize(search_context:, search_session:) ⇒ SearchContextComponent
Returns a new instance of SearchContextComponent.
7
8
9
10
11
|
# File 'app/components/blacklight/search_context_component.rb', line 7
def initialize(search_context:, search_session:)
Deprecation.warn("Blacklight::SearchContextComponent is deprecated and will be moved to Blacklight::SearchContext::ServerItemPaginationComponent in Blacklight 8.0.0")
@search_context = search_context
@search_session = search_session
end
|
Instance Method Details
#item_page_entry_info ⇒ Object
17
18
19
20
21
|
# File 'app/components/blacklight/search_context_component.rb', line 17
def item_page_entry_info
Deprecation.silence(Blacklight::CatalogHelperBehavior) do
helpers.item_page_entry_info
end
end
|
#link_to_next_document(document = nil, *args, **kwargs) ⇒ Object
29
30
31
32
33
|
# File 'app/components/blacklight/search_context_component.rb', line 29
def link_to_next_document(document = nil, *args, **kwargs)
Deprecation.silence(Blacklight::UrlHelperBehavior) do
helpers.link_to_next_document(document || @search_context[:next], *args, **kwargs)
end
end
|
#link_to_previous_document(document = nil, *args, **kwargs) ⇒ Object
23
24
25
26
27
|
# File 'app/components/blacklight/search_context_component.rb', line 23
def link_to_previous_document(document = nil, *args, **kwargs)
Deprecation.silence(Blacklight::UrlHelperBehavior) do
helpers.link_to_previous_document(document || @search_context[:prev], *args, **kwargs)
end
end
|
#render? ⇒ Boolean
13
14
15
|
# File 'app/components/blacklight/search_context_component.rb', line 13
def render?
@search_context.present? && (@search_context[:prev] || @search_context[:next])
end
|