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\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



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

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

#item(item:) ⇒ Object



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

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

#item_editor(item:) ⇒ Object



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

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

#new_itemsObject



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

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

#status_barObject



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

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