Module: Redmine::MenuManager

Defined in:
lib/redmine/menu_manager.rb

Defined Under Namespace

Modules: MenuController, MenuHelper Classes: Mapper, MenuError, MenuItem

Class Method Summary (collapse)

Class Method Details

+ (Object) items(menu_name)



307
308
309
# File 'lib/redmine/menu_manager.rb', line 307

def items(menu_name)
  @items[menu_name.to_sym] || Tree::TreeNode.new(:root, {})
end

+ (Object) map(menu_name)



297
298
299
300
301
302
303
304
305
# File 'lib/redmine/menu_manager.rb', line 297

def map(menu_name)
  @items ||= {}
  mapper = Mapper.new(menu_name.to_sym, @items)
  if block_given?
    yield mapper
  else
    mapper
  end
end