It returns menu as string
341797
def as_string(self, chars, current_linkable=False, class_current="active_link"):
        
        return self.__do_menu("as_string", current_linkable, class_current, chars)
628379
def _to_string(self):
        
        return u"{}+{}@{}".format(text_type(self.definition_id), self.BLOCK_TYPE_PREFIX, self.block_type)
768455
function menu(t) {
			var i, j, a, html, l, src = self.fm.options.contextmenu[t]||[];
			for (i=0; i < src.length; i++) {
				if (src[i] == 'delim') {
					self.menu.children().length && !self.menu.children(':last').hasClass('delim') && self.menu.append('<div class="delim" />');
				} else if (self.fm.ui.includeInCm(src[i], t)) {
					a = self.cmd[src[i]].argc();
					html = '';

					if (a.length) {
						html = '<span/><div class="el-finder-contextmenu-sub" style="z-index:'+(parseInt(self.menu.css('z-index'))+1)+'">';
						for (var j=0; j < a.length; j++) {
							html += '<div name="'+src[i]+'" argc="'+a[j].argc+'" class="'+a[j]['class']+'">'+a[j].text+'</div>';
						};
						html += '</div>';
					}
					self.menu.append('<div class="'+src[i]+'" name="'+src[i]+'">'+html+self.cmdName(src[i])+'</div>');
				}
			};
		}
1134084
def get_as_string(self, key):
        
        value = self.get(key)
        return StringConverter.to_string(value)
175208
def toString(self):
        
        slist = self.toList()
        sign = '' if slist[0] == '+' else '-'
        string = '/'.join(['%02d' % v for v in slist[1:]])
        return sign + string
695887
private String getMenuType(final WSubMenu submenu) {
		WMenu menu = WebUtilities.getAncestorOfClass(WMenu.class, submenu);
		switch (menu.getType()) {
			case BAR:
				return "bar";
			case FLYOUT:
				return "flyout";
			case TREE:
				return "tree";
			case COLUMN:
				return "column";
			default:
				throw new IllegalStateException("Invalid menu type: " + menu.getType());
		}
	}
306990
function get_menu_info(){
    
        $url = self::API_URI . self::MENU_INFO;
        $param['access_token'] = $this->access_token;
        $menu_url = $this->create_url($url, $param);
    
        $data = $this->http_get($menu_url);
    
        return $this->return_data($data);
    }
1147735
def generate_menu():
    
    if db is not None:
        needs_rebuild = db.get('site:needs_rebuild')
    else:
        needs_rebuild = site.coil_needs_rebuild
    if needs_rebuild not in (u'0', u'-1', b'0', b'-1'):
        return ('</li><li><a href="{0}"><i class="fa fa-fw '
                'fa-warning"></i> <strong>Rebuild</strong></a></li>'.format(
                    url_for('rebuild')))
    else:
        return ('</li><li><a href="{0}"><i class="fa fa-fw '
                'fa-cog"></i> Rebuild</a></li>'.format(url_for('rebuild')))
1151710
def show(self, index):
        
        if self.menu and self.menu.parent:
            self.text = "Return to %s" % self.menu.parent.title
            # Check if menu title ends with menu. (Some menus will include Menu in the name).
            if not self.text.strip().lower().endswith("menu"):
                self.text += " menu"
        else:
            self.text = "Exit"
        return super(ExitItem, self).show(index)
479089
def as_ul(self, current_linkable=False, class_current="active_link",
              before_1="", after_1="", before_all="", after_all=""):
        
        return self.__do_menu("as_ul", current_linkable, class_current,
                              before_1=before_1, after_1=after_1, before_all=before_all, after_all=after_all)
239946
public String getString(String strKey)
    {
        if (m_resources == null)
        {
            BaseApplication application = (BaseApplication)this.getTask().getApplication();
            m_resources = application.getResources(ResourceConstants.MENU_RESOURCE, true);
        }
        return m_resources.getString(strKey);
    }
1249443
function prompt(menu){
    return new Promise(function(resolve, reject){

        // user confirmation required!
        _prompt.start();
        _prompt.message = '';
        _prompt.delimiter = '';
        _prompt.colors = false;

        _prompt.get(menu, function (err, result){
            if (err){
                reject(err);
            }else{
                resolve(result);
            }
        });

    });
}
504671
function () {
            var self = this, cur = self, last;
            do {
                // 沿着 menu，menuitem 链
                last = cur;
                cur = cur.get('parent');
            } while (cur && (cur.isMenuItem || cur.isMenu));
            return last;
        }
1187032
def obtain_menu(menu = nil,  sub = false, c = '')
			if menu.is_a? Integer
				data =
					if sub 
						MenuOption.where(:parent_id => MenuOption.find(menu).option_id)
					else 
						MenuOption.where(:menu_id => menu, :parent_id => nil)
					end
			else
				m = Menu.find_by_key(menu)
				data = 
					if m.blank? 
						[]
					elsif sub 
						MenuOption.where(:parent_id => MenuOption.find(m[:id]).option_id)
					else 
						MenuOption.where(:menu_id => m[:id], :parent_id => nil)
					end

			end


			html = "<ul class='menu_#{menu} #{c}'>"

			if !data.blank?
				
				data.each do |m|
					if m.parent_id != 0
						existingData = make_hash m.custom_data

						name = existingData['label']
						attributes = menu_routing(m)
						html += "<li class='menu_link_wrapper wrapper_#{existingData['class']}' ><a " + attributes + ">#{name}</a>"

						if descendants_count(m) > 0
							html += get_menu m.id, true

						end

						html += '</li>'

					end
				end
				
			end

			html +='</ul>'

			html.html_safe

		end
1096795
public static void encodeDropMenuStart(DropMenu c, ResponseWriter rw, String l) throws IOException {
		rw.startElement("ul", c);
		if (c.getContentClass() != null)
			rw.writeAttribute("class", "dropdown-menu " + c.getContentClass(), "class");
		else
			rw.writeAttribute("class", "dropdown-menu", "class");
		if (null != c.getContentStyle())
			rw.writeAttribute("style", c.getContentStyle(), "style");
		rw.writeAttribute("role", "menu", null);
		rw.writeAttribute("aria-labelledby", l, null);
	}
921466
def menu():
    
    root = MenuItem('')

    for mod in droplet.modules():
        if mod.installed:
            module_path = mod.__class__.__module__.rsplit('.', 1)[0]
            menu = import_module(module_path + '.menu')
            if menu:
                menu.menu(root)

    return root
729941
def menu_callback(m):
    ''''''
    if m.returnkey.startswith('# '):
        cmd = m.returnkey[2:]
        if m.handler is not None:
            if m.handler_result is None:
                return
            cmd += m.handler_result
        process_stdin(cmd)
    elif m.returnkey == 'menuSettings':
        wxsettings.WXSettings(mestate.settings)
    elif m.returnkey.startswith("mode-"):
        idx = int(m.returnkey[5:])
        mestate.flightmode_selections[idx] = m.IsChecked()
    else:
        print('Unknown menu selection: %s' % m.returnkey)