Class: GovukComponent::FooterComponent

Inherits:
Base
  • Object
show all
Includes:
GovukLinkHelper
Defined in:
app/components/govuk_component/footer_component.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#html_attributes

Instance Method Summary collapse

Methods included from GovukLinkHelper

#govuk_breadcrumb_link_to, #govuk_button_classes, #govuk_button_link_to, #govuk_button_to, #govuk_footer_link_to, #govuk_link_classes, #govuk_link_to, #govuk_mail_to

Methods inherited from Base

#brand, #class_prefix

Constructor Details

#initialize(classes: [], container_classes: [], container_html_attributes: {}, copyright_text: config.default_footer_copyright_text, copyright_url: config.default_footer_copyright_url, html_attributes: {}, meta_items: {}, meta_items_title: "Support links", meta_licence: nil, meta_text: config.default_footer_component_meta_text, meta_classes: [], meta_html_attributes: {}) ⇒ FooterComponent

Returns a new instance of FooterComponent.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'app/components/govuk_component/footer_component.rb', line 15

def initialize(
  classes: [],
  container_classes: [],
  container_html_attributes: {},
  copyright_text: config.default_footer_copyright_text,
  copyright_url: config.default_footer_copyright_url,
  html_attributes: {},
  meta_items: {},
  meta_items_title: "Support links",
  meta_licence: nil,
  meta_text: config.default_footer_component_meta_text,
  meta_classes: [],
  meta_html_attributes: {}
)
  @meta_text                        = meta_text
  @meta_items                       = build_meta_links(meta_items)
  @meta_items_title                 = meta_items_title
  @meta_licence                     = meta_licence
  @custom_meta_classes              = meta_classes
  @custom_meta_html_attributes      = meta_html_attributes
  @copyright_text                   = copyright_text
  @copyright_url                    = copyright_url
  @custom_container_classes         = container_classes
  @custom_container_html_attributes = container_html_attributes

  super(classes:, html_attributes:)
end

Instance Attribute Details

Returns the value of attribute copyright_text.



13
14
15
# File 'app/components/govuk_component/footer_component.rb', line 13

def copyright_text
  @copyright_text
end

Returns the value of attribute copyright_url.



13
14
15
# File 'app/components/govuk_component/footer_component.rb', line 13

def copyright_url
  @copyright_url
end

#custom_container_classesObject (readonly)

Returns the value of attribute custom_container_classes.



13
14
15
# File 'app/components/govuk_component/footer_component.rb', line 13

def custom_container_classes
  @custom_container_classes
end

#meta_itemsObject (readonly)

Returns the value of attribute meta_items.



13
14
15
# File 'app/components/govuk_component/footer_component.rb', line 13

def meta_items
  @meta_items
end

#meta_items_titleObject (readonly)

Returns the value of attribute meta_items_title.



13
14
15
# File 'app/components/govuk_component/footer_component.rb', line 13

def meta_items_title
  @meta_items_title
end

#meta_licenceObject (readonly)

Returns the value of attribute meta_licence.



13
14
15
# File 'app/components/govuk_component/footer_component.rb', line 13

def meta_licence
  @meta_licence
end

#meta_textObject (readonly)

Returns the value of attribute meta_text.



13
14
15
# File 'app/components/govuk_component/footer_component.rb', line 13

def meta_text
  @meta_text
end