Class: Katalyst::Content::Editor::NewItemsComponent

Inherits:
BaseComponent
  • Object
show all
Includes:
Turbo::FramesHelper
Defined in:
app/components/katalyst/content/editor/new_items_component.rb

Constant Summary

Constants inherited from BaseComponent

BaseComponent::CONTAINER_CONTROLLER, BaseComponent::ITEM_CONTROLLER, BaseComponent::LIST_CONTROLLER, BaseComponent::NEW_ITEM_CONTROLLER, BaseComponent::STATUS_BAR_CONTROLLER

Instance Attribute Summary

Attributes inherited from BaseComponent

#container, #item

Instance Method Summary collapse

Methods inherited from BaseComponent

#attributes_scope, #call, #container_form_id, #initialize, #inspect

Constructor Details

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

Instance Method Details

#itemsObject



11
12
13
14
15
16
# File 'app/components/katalyst/content/editor/new_items_component.rb', line 11

def items
  Katalyst::Content.config.items.map do |item_class|
    item_class = item_class.safe_constantize if item_class.is_a?(String)
    item_class.new(container:)
  end
end