Class: Avo::Index::GridItemComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Avo::Index::GridItemComponent
- Defined in:
- app/components/avo/index/grid_item_component.rb
Instance Attribute Summary collapse
-
#actions ⇒ Object
readonly
Returns the value of attribute actions.
-
#parent_resource ⇒ Object
readonly
Returns the value of attribute parent_resource.
Instance Method Summary collapse
-
#initialize(resource: nil, reflection: nil, parent_record: nil, parent_resource: nil, actions: nil) ⇒ GridItemComponent
constructor
A new instance of GridItemComponent.
Methods included from Fields::Concerns::HasHTMLAttributes
Methods included from ResourcesHelper
#field_wrapper, #filter_wrapper, #index_field_wrapper, #item_select_all_input, #item_selector_init, #item_selector_input, #resource_grid, #resource_table
Methods inherited from BaseComponent
Constructor Details
#initialize(resource: nil, reflection: nil, parent_record: nil, parent_resource: nil, actions: nil) ⇒ GridItemComponent
Returns a new instance of GridItemComponent.
9 10 11 12 13 14 15 16 17 |
# File 'app/components/avo/index/grid_item_component.rb', line 9 def initialize(resource: nil, reflection: nil, parent_record: nil, parent_resource: nil, actions: nil) @resource = resource @reflection = reflection @parent_record = parent_record @parent_resource = parent_resource @actions = actions @card = Avo::ExecutionContext.new(target: resource.grid_view[:card], resource: resource, record: resource.record).handle @whole_html = Avo::ExecutionContext.new(target: resource.grid_view[:html], resource: resource, record: resource.record).handle end |
Instance Attribute Details
#actions ⇒ Object (readonly)
Returns the value of attribute actions.
7 8 9 |
# File 'app/components/avo/index/grid_item_component.rb', line 7 def actions @actions end |
#parent_resource ⇒ Object (readonly)
Returns the value of attribute parent_resource.
7 8 9 |
# File 'app/components/avo/index/grid_item_component.rb', line 7 def parent_resource @parent_resource end |