app/controllers/anoubis/output/menu.rb
##
# Adds new element into menu hash
# @param [Hash] options the menu element options
# @option options [String] :title The title of the menu element.
# @option options [String] :page_title The page title of the menu element.
# @option options [String] :short_title The short title of the menu element.
# @option options [String] :mode The mode of the menu element.
# @option options [String] :action The action type of the menu element ('menu', 'data').
# @option options [Number] :position The position of the menu element in current level.
# @option options [Number] :tab The level of the menu element.
# @option options [String] :state The show state of the menu element ('visible', 'hidden').
# @option options [String] :access The access to the menu element for current user ('read', 'write').
Adds new element into menu hash
Adds new element into menu hash
def addElement(options)
        if options.has_key? :parent
          if !self.keys.has_key? options[:parent].to_s.to_sym
            options[:parent] = nil
          end
        end
        menu = MenuItem.new options
        self.items.push menu
        self.keys[menu.mode.to_s.to_sym] = self.items[self.items.count-1]
      end
def addElement ( options ) if options . has_key? :parent if ! self . keys . has_key? options [ :parent ] . to_s . to_sym options [ :parent ] = nil end end menu = MenuItem . new options self . items . push menu self . keys [ menu . mode . to_s . to_sym ] = self . items [ self . items . count - 1 ] end
Adds new element into menu hash
Adds new element into menu hash
options
:access The access to the menu element for current user ('read', 'write').
: access The access to the menu element for current user ( ' read ' ' write ' ) .
<not_specific>
options the menu element options
options the menu element options