Class: Katalyst::Content::Item
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Katalyst::Content::Item
- Defined in:
- app/models/katalyst/content/item.rb
Overview
STI base class for content items
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#depth ⇒ Object
Returns the value of attribute depth.
-
#index ⇒ Object
Returns the value of attribute index.
-
#parent ⇒ Object
Returns the value of attribute parent.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
18 19 20 |
# File 'app/models/katalyst/content/item.rb', line 18 def children @children end |
#depth ⇒ Object
Returns the value of attribute depth.
18 19 20 |
# File 'app/models/katalyst/content/item.rb', line 18 def depth @depth end |
#index ⇒ Object
Returns the value of attribute index.
18 19 20 |
# File 'app/models/katalyst/content/item.rb', line 18 def index @index end |
#parent ⇒ Object
Returns the value of attribute parent.
18 19 20 |
# File 'app/models/katalyst/content/item.rb', line 18 def parent @parent end |
Class Method Details
.config ⇒ Object
7 8 9 |
# File 'app/models/katalyst/content/item.rb', line 7 def self.config Katalyst::Content.config end |
.permitted_params ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/models/katalyst/content/item.rb', line 20 def self.permitted_params i[ container_type container_id type heading show_heading background visible ] end |
Instance Method Details
#layout? ⇒ Boolean
36 37 38 |
# File 'app/models/katalyst/content/item.rb', line 36 def layout? is_a? Layout end |
#to_plain_text ⇒ Object
32 33 34 |
# File 'app/models/katalyst/content/item.rb', line 32 def to_plain_text heading if show_heading? && visible? end |