Class: Blacklight::SearchContextComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/blacklight/search_context_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(search_context:, search_session:) ⇒ SearchContextComponent

Returns a new instance of SearchContextComponent.



7
8
9
10
# File 'app/components/blacklight/search_context_component.rb', line 7

def initialize(search_context:, search_session:)
  @search_context = search_context
  @search_session = search_session
end

Instance Method Details

#item_page_entry_infoObject



16
17
18
19
20
# File 'app/components/blacklight/search_context_component.rb', line 16

def 
  Deprecation.silence(Blacklight::CatalogHelperBehavior) do
    helpers.
  end
end


28
29
30
31
32
# File 'app/components/blacklight/search_context_component.rb', line 28

def link_to_next_document(*args)
  Deprecation.silence(Blacklight::UrlHelperBehavior) do
    helpers.link_to_next_document(*args)
  end
end


22
23
24
25
26
# File 'app/components/blacklight/search_context_component.rb', line 22

def link_to_previous_document(*args)
  Deprecation.silence(Blacklight::UrlHelperBehavior) do
    helpers.link_to_previous_document(*args)
  end
end

#render?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/components/blacklight/search_context_component.rb', line 12

def render?
  @search_context.present? && (@search_context[:prev] || @search_context[:next])
end