Class: Avo::ResourceSidebarComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/avo/resource_sidebar_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource: nil, fields: nil, index: nil, params: nil, form: nil, view: nil) ⇒ ResourceSidebarComponent

Returns a new instance of ResourceSidebarComponent.



10
11
12
13
14
15
16
# File 'app/components/avo/resource_sidebar_component.rb', line 10

def initialize(resource: nil, fields: nil, index: nil, params: nil, form: nil, view: nil)
  @resource = resource
  @fields = fields
  @params = params
  @view = view
  @form = form
end

Instance Attribute Details

#fieldsObject (readonly)

Returns the value of attribute fields.



8
9
10
# File 'app/components/avo/resource_sidebar_component.rb', line 8

def fields
  @fields
end

#formObject (readonly)

Returns the value of attribute form.



7
8
9
# File 'app/components/avo/resource_sidebar_component.rb', line 7

def form
  @form
end

#paramsObject (readonly)

Returns the value of attribute params.



5
6
7
# File 'app/components/avo/resource_sidebar_component.rb', line 5

def params
  @params
end

#resourceObject (readonly)

Returns the value of attribute resource.



4
5
6
# File 'app/components/avo/resource_sidebar_component.rb', line 4

def resource
  @resource
end

#viewObject (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

Returns:

  • (Boolean)


18
19
20
# File 'app/components/avo/resource_sidebar_component.rb', line 18

def render?
  Avo.license.has_with_trial(:resource_sidebar)
end