Class: Blacklight::MetadataFieldLayoutComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/blacklight/metadata_field_layout_component.rb

Direct Known Subclasses

MetadataFieldPlainTextLayoutComponent

Constant Summary

Constants inherited from Component

Component::EXCLUDE_VARIABLES

Instance Method Summary collapse

Methods inherited from Component

compiler, config, #inspect

Constructor Details

#initialize(field:, value_tag: 'dd', label_class: 'col-md-3', value_class: 'col-md-9') ⇒ MetadataFieldLayoutComponent

Returns a new instance of MetadataFieldLayoutComponent.

Parameters:



18
19
20
21
22
23
24
# File 'app/components/blacklight/metadata_field_layout_component.rb', line 18

def initialize(field:, value_tag: 'dd', label_class: 'col-md-3', value_class: 'col-md-9')
  @field = field
  @key = @field.key.parameterize
  @label_class = label_class
  @value_tag = value_tag
  @value_class = value_class
end