Class: Katalyst::Navigation::Item

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
app/models/katalyst/navigation/item.rb

Overview

STI base class for menu items (headings, links and buttons)

Direct Known Subclasses

Button, Layout, Link

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



11
12
13
# File 'app/models/katalyst/navigation/item.rb', line 11

def children
  @children
end

#depthObject

Returns the value of attribute depth.



11
12
13
# File 'app/models/katalyst/navigation/item.rb', line 11

def depth
  @depth
end

#indexObject

Returns the value of attribute index.



11
12
13
# File 'app/models/katalyst/navigation/item.rb', line 11

def index
  @index
end

#parentObject

Returns the value of attribute parent.



11
12
13
# File 'app/models/katalyst/navigation/item.rb', line 11

def parent
  @parent
end

Class Method Details

.permitted_paramsObject



13
14
15
16
17
18
19
# File 'app/models/katalyst/navigation/item.rb', line 13

def self.permitted_params
  %i[
    title
    visible
    type
  ]
end

Instance Method Details

#layout?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'app/models/katalyst/navigation/item.rb', line 21

def layout?
  is_a? Layout
end