Class: Avo::Resources::Items::Sidebar
- Inherits:
-
Object
- Object
- Avo::Resources::Items::Sidebar
- Includes:
- Concerns::HasItemType, Concerns::HasItems, Concerns::IsResourceItem, Concerns::IsVisible, Concerns::VisibleInDifferentViews
- Defined in:
- lib/avo/resources/items/sidebar.rb
Defined Under Namespace
Classes: Builder
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes included from Concerns::VisibleInDifferentViews
#show_on_edit, #show_on_index, #show_on_new, #show_on_preview, #show_on_show
Attributes included from Concerns::IsVisible
Attributes included from Concerns::HasItems
Attributes included from Concerns::IsResourceItem
Instance Method Summary collapse
-
#initialize(name: nil, view: nil, **args) ⇒ Sidebar
constructor
A new instance of Sidebar.
- #panel_wrapper? ⇒ Boolean
Methods included from Concerns::VisibleInDifferentViews
#except_on, #hide_on, #initialize_views, #only_on, #post_initialize, #show_on, #show_on_create, #show_on_update, #visible_in_view?
Methods included from Concerns::IsVisible
Methods included from Concerns::HasItemType
#is_field?, #is_heading?, #is_main_panel?, #is_panel?, #is_row?, #is_sidebar?, #is_tab?, #is_tab_group?, #is_tool?
Methods included from Concerns::HasItems
#fields, #get_field, #get_field_definitions, #get_fields, #get_items, #get_preview_fields, #invalid_fields, #is_empty?, #items, #only_fields, #tab_groups, #visible_items
Methods included from Concerns::IsResourceItem
Methods included from Concerns::Hydration
Constructor Details
#initialize(name: nil, view: nil, **args) ⇒ Sidebar
Returns a new instance of Sidebar.
13 14 15 16 17 18 19 20 21 |
# File 'lib/avo/resources/items/sidebar.rb', line 13 def initialize(name: nil, view: nil, **args) @name = name @items_holder = Avo::Resources::Items::Holder.new @view = Avo::ViewInquirer.new view @panel_wrapper = args[:panel_wrapper].nil? ? true : args[:panel_wrapper] @args = args post_initialize if respond_to?(:post_initialize) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/avo/resources/items/sidebar.rb', line 11 def name @name end |
Instance Method Details
#panel_wrapper? ⇒ Boolean
23 24 25 |
# File 'lib/avo/resources/items/sidebar.rb', line 23 def panel_wrapper? @panel_wrapper end |