Display site map as HTML

@param Menu[]

@return string
500168
private function displayHTML($menus)
    {
        $build    = [];
        $manager  = $this->getTreeManager();

        /** @var \MakinaCorpus\Umenu\Menu $menu */
        foreach ($menus as $menu) {
            if ($menu->isSiteMain() || !$menu->hasRole()) {
                $tree = $manager->buildTree($menu->getId(), true);
                if (!$tree->isEmpty()) {
                    $build[$menu->getTitle()] = $tree;
                }
            }
        }

        return theme('ucms_seo_sitemap', ['menus' => $build]);
    }
1092442
public function render()
    {
        $htmlSrc = '<' . $this->containerTag . ' class="' . $this->breadcrumbClass . '">' . PHP_EOL;
        foreach ($this->links as $key => $row) {
            $htmlSrc .= '<' . $this->itemTag . '>' . $row . '</' . $this->itemTag . '>' . PHP_EOL;
        }
        $htmlSrc .= '</' . $this->containerTag . '>' . PHP_EOL;

        return $htmlSrc;
    }
1300991
public static function renderMenu(array $options = []) : string {
		if (!\Object\Error\Base::$flag_database_tenant_not_found) {
			$data = \Object\ACL\Resources::getStatic('menu', 'primary');
			// get logo image
			$brand_logo = \Object\ACL\Resources::getStatic('layout', 'logo', 'method');
			if (!empty($options['brand_logo'])) {
				$brand_logo = $options['brand_logo'];
			} else {
				$brand_logo = \Object\ACL\Resources::getStatic('layout', 'logo', 'method');
				if (!empty($brand_logo)) {
					$method = \Factory::method($brand_logo, null, true);
					$brand_logo = call_user_func_array($method, []);
				}
			}
			// logo url
			return \HTML::menu([
				'brand_name' => \Application::get('application.layout.name'),
				'brand_logo' => $brand_logo,
				'brand_url' => $options['brand_url'] ?? \Object\ACL\Resources::getStatic('postlogin_brand_url', 'url', 'url'),
				'options' => $data[200] ?? [],
				'options_right' => $data[210] ?? [],
				'class' => $options['class'] ?? null
			]);
		} else {
			return '';
		}
	}
330263
public function sitemapAction()
    {
        /* @var ContentInterface[] $content */
        $contents = $this->get('opifer.content.content_manager')->getRepository()->findIndexable();

        $event = new SitemapEvent();

        foreach ($contents as $content) {
            $event->addUrl($this->generateUrl('_content', ['slug' => $content->getSlug()], UrlGeneratorInterface::ABSOLUTE_URL), $content->getUpdatedAt());
        }

        $dispatcher = $this->get('event_dispatcher');
        $dispatcher->dispatch(Events::POPULATE_SITEMAP, $event);

        return $this->render('OpiferCmsBundle:Sitemap:sitemap.xml.twig', [
            'urls' => $event->getUrls(),
        ]);
    }
589644
public function lang_menu() {
        global $CFG;

        if (empty($CFG->langmenu)) {
            return '';
        }

        if ($this->page->course != SITEID and !empty($this->page->course->lang)) {
            // do not show lang menu if language forced
            return '';
        }

        $currlang = current_language();
        $langs = get_string_manager()->get_list_of_translations();

        if (count($langs) < 2) {
            return '';
        }

        $s = new single_select($this->page->url, 'lang', $langs, $currlang, null);
        $s->label = get_accesshide(get_string('language'));
        $s->class = 'langmenu';
        return $this->render($s);
    }
11741
protected function menu()
    {

        $this->Benchmark->start('getMenu');
        try {
            $menu = $this->CMSNavItemService->getMenu();
        } catch (Exception $e) {
            return '';
        }
        $this->Benchmark->end('getMenu');

        $this->Benchmark->start('buildMenu');
        $dom_id    = $this->getParameter('id');
        $dom_class = $this->getParameter('class');

        $this->matchedCurrentURI = false;

        $root_options = array();
        if (!empty($dom_id))
            $root_options[] = "id='{$dom_id}'";
        if (!empty($dom_class))
            $root_options[] = "class='{$dom_class}'";

        $family_tree = "<ul " . join(' ', $root_options). ">\n";

        $this->requestURI = ltrim($this->Request->getAdjustedRequestURI(), '/');

        foreach ( $menu as $parent ) {
            $family_tree .= $this->_buildMenuTree($parent, "parent", "<span>%s</span>", true);
        }

        $family_tree .= "</ul>\n";
        $this->Benchmark->end('buildMenu');

        return $family_tree;
    }
878572
function getMapJS() {
		$_script = "";
		$_key = $this->map_id;
		$_output = '<script type="text/javascript" charset="utf-8">' . "\n";
        $_output .= '//<![CDATA[' . "\n";
        $_output .= "/*************************************************\n";
        $_output .= " * Created with GoogleMapAPI" . $this->_version . "\n";
        $_output .= " * Author: Brad Wedell <brad AT mycnl DOT com>\n";
        $_output .= " * Link http://code.google.com/p/php-google-map-api/\n";
        $_output .= " * Copyright 2010-2012 Brad Wedell\n";
        $_output .= " * Original Author: Monte Ohrt <monte AT ohrt DOT com>\n";
        $_output .= " * Original Copyright 2005-2006 New Digital Group\n";
        $_output .= " * Originial Link http://www.phpinsider.com/php/code/GoogleMapAPI/\n";
        $_output .= " *************************************************/\n";
        
        // create global info window ( so we can auto close it )
        $_script .= "var infowindow = new google.maps.InfoWindow();";
			        
        
		if($this->street_view_dom_id!=""){
			$_script .= "
				var panorama".$this->street_view_dom_id."$_key = '';
			";
			if(!empty($this->_markers)){
				$_script .= "
					var panorama".$this->street_view_dom_id."markers$_key = [];
				";
			}
		}
		
		if(!empty($this->_markers)){
			$_script .= "
				var markers$_key  = [];
			";
			if($this->sidebar) {        
				$_script .= "
					var sidebar_html$_key  = '';
					var marker_html$_key  = [];
				";
			}
		}
		if($this->marker_clusterer){
			$_script .= "
			  var markerClusterer$_key = null;
			";
		}        
        if($this->directions) {        
            $_script .= "
                var to_htmls$_key  = [];
                var from_htmls$_key  = [];
            ";
        }
		if(!empty($this->_directions)){
			$_script .= "
			    var directions$_key = [];
			";
		}
		//Polylines
		if(!empty($this->_polylines)){
			$_script .= "
				var polylines$_key = [];
				var polylineCoords$_key = [];
			";
			if(!empty($this->_elevation_polylines)){
				$_script .= "
					var elevationPolylines$_key = [];
				";
			}
		}
        //Polygons
		if(!empty($this->_polygons)){
			$_script .= "
				var polygon$_key = [];
				var polygonCoords$_key = [];
			";
		}
		//Elevation stuff
		if(!empty($this->_elevation_polylines)||(!empty($this->_directions)&&$this->elevation_directions)){
			$_script .= "
				var elevationCharts$_key = [];				
			";
		}
		//Overlays
		if(!empty($this->_overlays)){
			$_script .= "
				var overlays$_key = [];
			";
		}
        //KML Overlays
        if(!empty($this->_kml_overlays)){
            $_script .= "
                var kml_overlays$_key = [];
            ";
        }
        //New Icons
        if(!empty($this->_marker_icons)){
        	$_script .= "var icon$_key  = []; \n";
        	foreach($this->_marker_icons as $icon_key=>$icon_info){
        		//no need to check icon key here since that's already done with setters
        		$_script .= "
        		  icon".$_key."['$icon_key'] = {};
        		  icon".$_key."['$icon_key'].image =  new google.maps.MarkerImage('".$icon_info["image"]."',
				      // The size
				      new google.maps.Size(".$icon_info['iconWidth'].", ".$icon_info['iconHeight']."),
				      // The origin(sprite)
				      new google.maps.Point(0,0),
				      // The anchor
				      new google.maps.Point(".$icon_info['iconAnchorX'].", ".$icon_info['iconAnchorY'].")
                  );
        		";
        		if(isset($icon_info['shadow']) && $icon_info['shadow']!=""){
        		  $_script .= "
                    icon".$_key."['$icon_key'].shadow = new google.maps.MarkerImage('".$icon_info["shadow"]."',
                      // The size
                      new google.maps.Size(".$icon_info['shadowWidth'].", ".$icon_info['shadowHeight']."),
                      // The origin(sprite)
                      new google.maps.Point(0,0),
                      // The anchor
                      new google.maps.Point(".$icon_info['iconAnchorX'].", ".$icon_info['iconAnchorY'].")
                    );
                  ";
        		}
        	}
        }
                           
        $_script .= "var map$_key = null;\n";
		
		//start setting script var
        if($this->onload) {
           $_script .= 'function onLoad'.$this->map_id.'() {' . "\n";   
        } 
                
        if(!empty($this->browser_alert)) {
        	//TODO:Update with new browser catch - GBrowserIsCompatible is deprecated
            //$_output .= 'if (GBrowserIsCompatible()) {' . "\n";
        }
        
        /*
         *TODO:Update with local search bar once implemented in V3 api 
		$strMapOptions = "";
		if($this->local_search){
			$_output .= "
				mapOptions.googleBarOptions= {
					style : 'new'
					".(($this->local_search_ads)?",
					adsOptions: {
					    client: '".$this->ads_pub_id."',
					    channel: '".$this->ads_channel."',
					    language: 'en'
					":"")."
				};
			";            
			$strMapOptions .= ", mapOptions";
		}
        */
		
		if($this->display_map){
			$_script .= sprintf('var mapObj%s = document.getElementById("%s");', $_key, $this->map_id) . "\n";
			$_script .= "if (mapObj$_key != 'undefined' && mapObj$_key != null) {\n";
			
			$_script .= "
				var mapOptions$_key = {
					scrollwheel: ". ($this->scrollwheel?"true":"false") . ",
					zoom: ".$this->zoom.",
					draggable: ".$this->draggable.",
					maxZoom: ".$this->max_zoom.",
					minZoom: ".$this->min_zoom.",
					mapTypeId: google.maps.MapTypeId.".$this->map_type.",
					mapTypeControl: ".($this->type_controls?"true":"false").",
					mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.".$this->type_controls_style."}
				};
			";
			if(isset($this->center_lat) && isset($this->center_lon)) {
				// Special care for decimal point in lon and lat, would get lost if "wrong" locale is set; applies to (s)printf only
				$_script .= "
					mapOptions".$_key.".center = new google.maps.LatLng(
						".number_format($this->center_lat, 6, ".", "").",
						".number_format($this->center_lon, 6, ".", "")."
					);
				";
			}   
			
			if($this->street_view_controls){
				$_script .= "
					mapOptions".$_key.".streetViewControl= true;
	
				";
			}
			
			
			// Add any map styles if they are present
			if( isset($this->map_styles) ) {
			
				$_script .= "
						var styles$_key = ".$this->map_styles.";		
				";
			}
			
			
			
			$_script .= "
				map$_key = new google.maps.Map(mapObj$_key,mapOptions$_key);
			";
			
			$_script .= "
				map$_key.setOptions({styles: styles$_key});
			";
				
			if($this->street_view_dom_id!=""){
				$_script .= "
					panorama".$this->street_view_dom_id."$_key = new  google.maps.StreetViewPanorama(document.getElementById('".$this->street_view_dom_id."'));
					map$_key.setStreetView(panorama".$this->street_view_dom_id."$_key);
				";
				
				if(!empty($this->_markers)){
					
					//Add markers to the street view
					if($this->street_view_dom_id!=""){
						$_script .= $this->getAddMarkersJS($this->map_id, $pano=true);
					}
					//set center to last marker
					$last_id = count($this->_markers)-1;
					
					$_script .= "
						panorama".$this->street_view_dom_id."$_key.setPosition(new google.maps.LatLng(
							".$this->_markers[$last_id]["lat"].",
							".$this->_markers[$last_id]["lon"]."
						));
						panorama".$this->street_view_dom_id."$_key.setVisible(true);
					";
				}
			}
			
			if(!empty($this->_directions)){
				$_script .= $this->getAddDirectionsJS();
			}
			
			//TODO:add support for Google Earth Overlay once integrated with V3
			//$_output .= "map.addMapType(G_SATELLITE_3D_MAP);\n";
			
			// zoom so that all markers are in the viewport
			if($this->zoom_encompass && (count($this->_markers) > 1 || count($this->_polylines) >= 1 || count($this->_overlays) >= 1)) {
				// increase bounds by fudge factor to keep
				// markers away from the edges
				$_len_lon = $this->_max_lon - $this->_min_lon;
				$_len_lat = $this->_max_lat - $this->_min_lat;
				$this->_min_lon -= $_len_lon * $this->bounds_fudge;
				$this->_max_lon += $_len_lon * $this->bounds_fudge;
				$this->_min_lat -= $_len_lat * $this->bounds_fudge;
				$this->_max_lat += $_len_lat * $this->bounds_fudge;
	
				$_script .= "var bds$_key = new google.maps.LatLngBounds(new google.maps.LatLng($this->_min_lat, $this->_min_lon), new google.maps.LatLng($this->_max_lat, $this->_max_lon));\n";
				$_script .= 'map'.$_key.'.fitBounds(bds'.$_key.');' . "\n";
			}
			
			/*
			 * TODO: Update controls to use new API v3 methods.(Not a priority, see below)
			 * default V3 functionality caters control display according to the 
			 * device that's accessing the page, as well as the specified width
			 * and height of the map itself.
			if($this->map_controls) {
			  if($this->control_size == 'large')
				  $_output .= 'map.addControl(new GLargeMapControl(), new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(10,10)));' . "\n";
			  else
				  $_output .= 'map.addControl(new GSmallMapControl(), new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(10,60)));' . "\n";
			}
			if($this->type_controls) {
				$_output .= 'map.addControl(new GMapTypeControl(), new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(10,10)));' . "\n";
			}
			
			if($this->scale_control) {
				if($this->control_size == 'large'){
					$_output .= 'map.addControl(new GScaleControl(), new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(35,190)));' . "\n";
				}else {
					$_output .= 'map.addControl(new GScaleControl(), new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(190,10)));' . "\n";
				}
			}
			if($this->overview_control) {
				$_output .= 'map.addControl(new GOverviewMapControl());' . "\n";
			}
			
			 * TODO: Update with ads_manager stuff once integrated into V3
			if($this->ads_manager){
				$_output .= 'var adsManager = new GAdsManager(map, "'.$this->ads_pub_id.'",{channel:"'.$this->ads_channel.'",maxAdsOnMap:"'.$this->ads_max.'"});
		   adsManager.enable();'."\n";
			
			}
			 * TODO: Update with local search once integrated into V3
			if($this->local_search){
				$_output .= "\n
					map.enableGoogleBar();
				";
			}
			*/
			
			if($this->traffic_overlay){
				$_script .= "
					var trafficLayer = new google.maps.TrafficLayer();
					trafficLayer.setMap(map$_key);
				";            
			}
			
			if($this->biking_overlay){
				$_script .= "
					var bikingLayer = new google.maps.BicyclingLayer();
					bikingLayer.setMap(map$_key);
				";            
			}
			
			$_script .= $this->getAddMarkersJS();
			
			$_script .= $this->getPolylineJS();
			$_script .= $this->getPolygonJS();
			$_script .= $this->getAddOverlayJS();
			
			if($this->_kml_overlays!==""){
			  foreach($this->_kml_overlays as $_kml_key=>$_kml_file){
				  $_script .= "
					  kml_overlays$_key[$_kml_key]= new google.maps.KmlLayer('$_kml_file');
					  kml_overlays$_key[$_kml_key].setMap(map$_key);
				  ";
			  }
			  $_script .= "
				  
			  ";
			}

			 //end JS if mapObj != "undefined" block
			$_script .= '}' . "\n";
		
		}//end if $this->display_map==true
       
        if(!empty($this->browser_alert)) {
            //TODO:Update with new browser catch SEE ABOVE
           // $_output .= '} else {' . "\n";
           // $_output .= 'alert("' . str_replace('"','\"',$this->browser_alert) . '");' . "\n";
           // $_output .= '}' . "\n";
        }                        

        if($this->onload) {
           $_script .= '}' . "\n";
        }
        
		$_script .= $this->getMapFunctions();
        
		if($this->_minify_js && class_exists("JSMin")){
			$_script = JSMin::minify($_script);
		}
		
		//Append script to output
		$_output .= $_script;
		$_output .= '//]]>' . "\n";
        $_output .= '</script>' . "\n";
        return $_output;
    }
617071
public function mapLink($title, $mapOptions = [], $linkOptions = []) {
		return $this->Html->link($title, $this->mapUrl($mapOptions + ['escape' => false]), $linkOptions);
	}
217465
private function buildMenu($menu)
	{
		$html = '';

		foreach ($menu as $value) {
			$icon = '';
			if (isset($value['icon'])) {
				$icon = sprintf('<i class="fa fa-%s"></i> ', $value['icon']);
			}

			if (isset($value['children'])) {
				$html.= '<li class="dropdown">';
				$html.= sprintf('<a href="#" class="dropdown-toggle" data-toggle="dropdown">%s%s<b class="caret"></b></a>', $icon, $value['title']);
				$html.= '<ul class="dropdown-menu">';
				$html.= $this->buildMenu($value['children']);
				$html.= '</ul>';
				$html.= '</li>';

				continue;
			}

			$url = '';

			if (isset($value['class'])) {
				$url = route('admin.model.index', urlencode($value['class']));
			} elseif (isset($value['url'])) {
				$url = url($value['url']);
			} elseif (isset($value['route'])) {
				$url = route($value['route']);
			}

			if (isset($value['text'])) {
				$html.= sprintf('<li><p class="navbar-text">%s</p></li>', $value['text']);
			} elseif (isset($value['image'])) {
				$html.= sprintf('<li><img src="%s" class="navbar-image"></li>', $value['image']);
			} else {
				$html.= sprintf('<li><a href="%s">%s%s</a></li>', $url, $icon, $value['title']);
			}
		}

		return $html;
	}
348283
public function generateDropdownMenu(&$menu)
    {
        foreach ($menu as $k => $v) {
            $project = $v["project"];
            $initproject = $v["project"];
            $projtitle = "<AUTO>";
            if (isset($v["title"])) {
                $projtitle = $v["title"];
            }

            $menu[$k]["title"] = ReporticoLang::translate($projtitle);
            foreach ($v["items"] as $k1 => $menuitem) {
                if (!isset($menuitem["reportname"]) || $menuitem["reportname"] == "<AUTO>") {
                    // Generate Menu from XML files
                    if (is_dir($this->projects_folder)) {
                        $proj_parent = $this->projects_folder;
                    } else {
                        $proj_parent = ReporticoUtility::findBestLocationInIncludePath($this->projects_folder);
                    }

                    $project = $initproject;
                    if (isset($menuitem["project"])) {
                        $project = $menuitem["project"];
                    }

                    $filename = $proj_parent . "/" . $project . "/" . $menuitem["reportfile"];
                    if (!preg_match("/\.xml/", $filename)) {
                        $filename .= ".xml";
                    }

                    if (is_file($filename)) {
                        $query = false;
                        $repxml = new XmlReader($query, $filename, false, "ReportTitle");
                        $menu[$k]["items"][$k1]["reportname"] = ReporticoLang::translate($repxml->search_response);
                        $menu[$k]["items"][$k1]["project"] = $project;
                    }
                }
            }
        }
    }
117322
public void printHtmlNavMenu(PrintWriter out)
        throws DBException
    {
        if (HHelpScreen.getFirstToUpper(this.getProperty(DBParams.NAVMENUS)) != UserInfoModel.NO_ICONS.charAt(0))
            super.printHtmlNavMenu(out);
        else
        { // Applets frequently turn off menu bars temporarly
            String strHTML = "\t<tr valign=top>\n\t<td>"; // Default menu = no table items
            out.println(strHTML);
        }
    }
1076905
public static function writeSitemap( $links, $fileName = "sitemap.xml", $baseUrl = "" )
	{
		$xml	= XML_DOM_GoogleSitemapBuilder::buildSitemap( $links, $baseUrl );
		$file	= new FS_File_Writer( $fileName );
		return $file->writeString( $xml );
	}
264069
@Override
	public String[] toStringArray() {
		ArrayList<String> out = new ArrayList<>();
		out.add("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
		out.add("<sitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n");
		ArrayList<WebPage> values = new ArrayList<>(urls.values());
		Collections.sort(values);
		for (WebPage webPage : values) {
			out.add(constructUrl(webPage));
		}
		out.add("</sitemapindex>");
		return out.toArray(new String[] {});
	}
752028
function menu($menus)
    {
        // Retrieve current user (for permissions)
        $user = Auth::user();

        $templates = [
            "menu" => '
              <ul class="sidebar-menu" data-widget="tree">
                %s
              </ul>
        ',

            "menu_row" => '
          <li class="%s">
            %s
          </li>
        ', // class, link . submenu

            "menu_caret" => '
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>',

            "menu_subrow" => '
          <ul class="treeview-menu">
            %s
          </ul>
        ',

            "menu_link" => '
          <a href="%s"><i class="%s text-red"></i><span>%s</span>%s</a>
        ' // url, icon, title
        ];

        $traverse = function ($rows) use (&$traverse, $templates, $user) {
            $menuString = "";
            $hasActive = false;
            foreach ($rows as $menu) {
                if (!empty($menu->permission) and !$user->hasPermission($menu->permission)) {
                    continue;
                }

                $hasActive = false;
                $submenu = "";
                $authorized = true;

                if ($menu->children->count() > 0) {
                    list($submenuString, $hasActive) = $traverse($menu->children);
                    $submenu = "";
                    if (!empty($submenuString)) {
                        $submenu = sprintf($templates['menu_subrow'], $submenuString);
                    } else {
                        $authorized = false;
                    }
                }

                $menu_caret = (!empty($submenu) ? $templates['menu_caret'] : '');
                $link = sprintf($templates['menu_link'],
                    (!empty($menu->route) ? url($menu->route) : '#'),
                    (!empty($menu->icon) ? $menu->icon : 'fa fa-circle-o'),
                    //trans('back-project::base.dashboard')
                    \Lang::has('back-project::menu.' . $menu->title) ? __('back-project::menu.' . $menu->title) : $menu->title,
                    $menu_caret
                );
                $class = (!empty($submenu) ? 'treeview' : '');
                $current_url = \Route::current()->uri();

                if ($authorized) {
                    $menuString .= sprintf($templates['menu_row'], $class, $link . $submenu);
                }
            }

            return [
                $menuString,
                $hasActive
            ];
        };

        list($menu, $hasActive) = $traverse($menus);
        return sprintf($templates['menu'], $menu);
    }
1248635
public function bootstrap4(): string
    {
        if (!empty($this->submenus)) {
            $submenus = '';
            foreach ($this->submenus as $submenu) {
                $attrs = '';
                foreach ($submenu->attrs as $key => $value) {
                    $attrs .= ' ' . $key . '="' . e($value) . '"';
                }

                $class = trim('dropdown-item ' . $submenu->class);
                $submenus .= '<a class="' . $class . '" href="' . e($submenu->link) . '"' . $attrs . '>' . $submenu->label . '</a>';
            }

            $class = trim('nav-item dropdown ' . $this->class);

            return
                '<li class="' . $class . '">' .
                '<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">' .
                $this->label .
                '<span class="caret"></span></a>' .
                '<div class="dropdown-menu" role="menu">' .
                $submenus .
                '</div>' .
                '</li>';
        }

        $attrs = '';
        foreach ($this->attrs as $key => $value) {
            $attrs .= ' ' . $key . '="' . e($value) . '"';
        }

        $class = trim('nav-item ' . $this->class);

        return '<li class="' . $class . '"><a class="nav-link" href="' . e($this->link) . '"' . $attrs . '>' . $this->label . '</a></li>';
    }
1370483
public function display()
    {
        if (!$this->isVisible())
            return "";

        $content = \mpf\web\helpers\Html::get()->tag('span', $this->getIcon() . $this->translate($this->label), $this->labelHtmlOptions);
        $submenu = "";
        if (count($this->items)) {
            $this->htmlOptions['class'] = (isset($this->htmlOptions['class']) ? $this->htmlOptions['class'] . ' ' : '') . 'm-menu-dropdown';
            $anySelected = false;
            $anyVisible = false;
            foreach ($this->items as $item) {
                /* @var $item Label */
                $submenu .= $item->display();
                $anySelected = $anySelected || $item->isSelected();
                $anyVisible = $anyVisible || $item->isVisible();
            }
            if ($anyVisible)
                $submenu = \mpf\web\helpers\Html::get()->tag('ul', $submenu);
            else
                $submenu = "";
            if ($anySelected) {
                if (isset($this->htmlOptions['class'])) {
                    $this->htmlOptions['class'] .= ' selected';
                } else {
                    $this->htmlOptions['class'] = 'selected';
                }
            }
        }
        return \mpf\web\helpers\Html::get()->tag('li', $content . $submenu, $this->htmlOptions);
    }
169245
protected function renderMenu()
    {
        if ($this->route === null && Yii::$app->controller !== null) {
            $this->route = Yii::$app->controller->getRoute();
        }
        if ($this->params === null) {
            $this->params = $_GET;
        }
        $items = $this->normalizeItems($this->items, $hasActiveChild);
        $options = $this->options;
        $tag = ArrayHelper::remove($options, 'tag', 'ul');
        return Html::tag($tag, $this->renderItems($items), $options);
    }