class GovukPublishingComponents::Presenters::BrexitCtaHelper

Constants

BREXIT_HUB_PAGE_IDS

Public Class Methods

new(content_item) click to toggle source
# File lib/govuk_publishing_components/presenters/brexit_cta_helper.rb, line 9
def initialize(content_item)
  @content_item = content_item
end

Public Instance Methods

title_key() click to toggle source
# File lib/govuk_publishing_components/presenters/brexit_cta_helper.rb, line 13
def title_key
  use_brexit_hub_page_navigation? ? "components.related_navigation.transition.hub_page_title" : "components.related_navigation.transition.title"
end

Private Instance Methods

use_brexit_hub_page_navigation?() click to toggle source
# File lib/govuk_publishing_components/presenters/brexit_cta_helper.rb, line 27
def use_brexit_hub_page_navigation?
  I18n.locale == :en &&
    BREXIT_HUB_PAGE_IDS.include?(@content_item["content_id"])
end