Class: Katalyst::Navigation::EditorComponent

Inherits:
Katalyst::Navigation::Editor::BaseComponent show all
Defined in:
app/components/katalyst/navigation/editor_component.rb

Constant Summary collapse

ACTIONS =
"submit->\#{MENU_CONTROLLER}#reindex\nnavigation:drop->\#{MENU_CONTROLLER}#drop\nnavigation:reindex->\#{MENU_CONTROLLER}#reindex\nnavigation:reset->\#{MENU_CONTROLLER}#reset\nturbo:render@document->\#{MENU_CONTROLLER}#connect\n".gsub(/\s+/, " ").freeze

Constants inherited from Katalyst::Navigation::Editor::BaseComponent

Katalyst::Navigation::Editor::BaseComponent::ITEM_CONTROLLER, Katalyst::Navigation::Editor::BaseComponent::LIST_CONTROLLER, Katalyst::Navigation::Editor::BaseComponent::MENU_CONTROLLER, Katalyst::Navigation::Editor::BaseComponent::NEW_ITEM_CONTROLLER, Katalyst::Navigation::Editor::BaseComponent::STATUS_BAR_CONTROLLER

Instance Attribute Summary

Attributes inherited from Katalyst::Navigation::Editor::BaseComponent

#menu

Instance Method Summary collapse

Methods inherited from Katalyst::Navigation::Editor::BaseComponent

#call, #initialize, #menu_form_id

Constructor Details

This class inherits a constructor from Katalyst::Navigation::Editor::BaseComponent

Instance Method Details

#errorsObject



30
31
32
# File 'app/components/katalyst/navigation/editor_component.rb', line 30

def errors
  @errors ||= Katalyst::Navigation.config.errors_component.constantize.new(menu:)
end

#item(item:) ⇒ Object



26
27
28
# File 'app/components/katalyst/navigation/editor_component.rb', line 26

def item(item:)
  Editor::ItemComponent.new(menu:, item:)
end

#item_editor(item:) ⇒ Object



22
23
24
# File 'app/components/katalyst/navigation/editor_component.rb', line 22

def item_editor(item:)
  Editor::ItemEditorComponent.new(menu:, item:)
end

#new_itemsObject



18
19
20
# File 'app/components/katalyst/navigation/editor_component.rb', line 18

def new_items
  @new_items ||= Editor::NewItemsComponent.new(menu:)
end

#status_barObject



14
15
16
# File 'app/components/katalyst/navigation/editor_component.rb', line 14

def status_bar
  @status_bar ||= Editor::StatusBarComponent.new(menu:)
end