Class: ForestAdminDatasourceToolkit::Components::Actions::ActionLayoutElement::PageElement
- Inherits:
-
BaseLayoutElement
- Object
- BaseLayoutElement
- ForestAdminDatasourceToolkit::Components::Actions::ActionLayoutElement::PageElement
- Defined in:
- lib/forest_admin_datasource_toolkit/components/actions/action_layout_element.rb
Instance Attribute Summary collapse
-
#elements ⇒ Object
Returns the value of attribute elements.
-
#next_button_label ⇒ Object
Returns the value of attribute next_button_label.
-
#previous_button_label ⇒ Object
Returns the value of attribute previous_button_label.
Attributes inherited from BaseLayoutElement
Instance Method Summary collapse
-
#initialize(elements:, previous_button_label:, next_button_label:, **options) ⇒ PageElement
constructor
A new instance of PageElement.
- #instantiate_elements(elements) ⇒ Object
Methods inherited from BaseLayoutElement
Constructor Details
#initialize(elements:, previous_button_label:, next_button_label:, **options) ⇒ PageElement
Returns a new instance of PageElement.
67 68 69 70 71 72 73 |
# File 'lib/forest_admin_datasource_toolkit/components/actions/action_layout_element.rb', line 67 def initialize(elements:, previous_button_label:, next_button_label:, **) super(component: 'Page', **) @elements = elements = = @elements = instantiate_elements(elements) end |
Instance Attribute Details
#elements ⇒ Object
Returns the value of attribute elements.
65 66 67 |
# File 'lib/forest_admin_datasource_toolkit/components/actions/action_layout_element.rb', line 65 def elements @elements end |
#next_button_label ⇒ Object
Returns the value of attribute next_button_label.
65 66 67 |
# File 'lib/forest_admin_datasource_toolkit/components/actions/action_layout_element.rb', line 65 def end |
#previous_button_label ⇒ Object
Returns the value of attribute previous_button_label.
65 66 67 |
# File 'lib/forest_admin_datasource_toolkit/components/actions/action_layout_element.rb', line 65 def end |
Instance Method Details
#instantiate_elements(elements) ⇒ Object
75 76 77 78 79 |
# File 'lib/forest_admin_datasource_toolkit/components/actions/action_layout_element.rb', line 75 def instantiate_elements(elements) elements.map do |element| ActionFieldFactory.build(element.to_h) end end |