Class: Avo::ResourceSidebarComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Avo::ResourceSidebarComponent
- Defined in:
- app/components/avo/resource_sidebar_component.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#form ⇒ Object
readonly
Returns the value of attribute form.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#view ⇒ Object
readonly
Returns the value of attribute view.
Instance Method Summary collapse
-
#initialize(resource: nil, sidebar: nil, index: nil, params: nil, form: nil, view: nil) ⇒ ResourceSidebarComponent
constructor
A new instance of ResourceSidebarComponent.
- #render? ⇒ Boolean
Constructor Details
#initialize(resource: nil, sidebar: nil, index: nil, params: nil, form: nil, view: nil) ⇒ ResourceSidebarComponent
Returns a new instance of ResourceSidebarComponent.
11 12 13 14 15 16 17 18 |
# File 'app/components/avo/resource_sidebar_component.rb', line 11 def initialize(resource: nil, sidebar: nil, index: nil, params: nil, form: nil, view: nil) @resource = resource @sidebar = @params = params @view = view @form = form @index = index end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
8 9 10 |
# File 'app/components/avo/resource_sidebar_component.rb', line 8 def fields @fields end |
#form ⇒ Object (readonly)
Returns the value of attribute form.
7 8 9 |
# File 'app/components/avo/resource_sidebar_component.rb', line 7 def form @form end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
9 10 11 |
# File 'app/components/avo/resource_sidebar_component.rb', line 9 def index @index end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
5 6 7 |
# File 'app/components/avo/resource_sidebar_component.rb', line 5 def params @params end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
4 5 6 |
# File 'app/components/avo/resource_sidebar_component.rb', line 4 def resource @resource end |
#view ⇒ Object (readonly)
Returns the value of attribute view.
6 7 8 |
# File 'app/components/avo/resource_sidebar_component.rb', line 6 def view @view end |
Instance Method Details
#render? ⇒ Boolean
20 21 22 |
# File 'app/components/avo/resource_sidebar_component.rb', line 20 def render? Avo.license.has_with_trial(:resource_sidebar) end |