當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Walker::end_lvl方法代碼示例

本文整理匯總了PHP中Walker::end_lvl方法的典型用法代碼示例。如果您正苦於以下問題:PHP Walker::end_lvl方法的具體用法?PHP Walker::end_lvl怎麽用?PHP Walker::end_lvl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Walker的用法示例。


在下文中一共展示了Walker::end_lvl方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

 function end_lvl(&$output, $depth = 0, $args = array())
 {
     global $subnaviditeration;
     global $topnav_dropdown_desc_values;
     global $topnav_dropdown_desc_values_defaults;
     // If we are at a parent element, output this code to end the div.w-row (includes description and picture in dropdown)
     // This sprintf function can probably be used in the future to put in the correct description and image.
     if (0 == $depth) {
         ${$subnaviditeration} = settype($subnaviditeration, 'integer');
         $text = $topnav_dropdown_desc_values[$subnaviditeration]['topnav_dropdown_desc_text'] ? $topnav_dropdown_desc_values[$subnaviditeration]['topnav_dropdown_desc_text'] : $topnav_dropdown_desc_values_defaults['topnav_dropdown_desc_text_default'];
         // if false
         $imgURL = $topnav_dropdown_desc_values[$subnaviditeration]['topnav_dropdown_desc_img']['url'] ? $topnav_dropdown_desc_values[$subnaviditeration]['topnav_dropdown_desc_img']['image_src']['medium'][0] : $topnav_dropdown_desc_values_defaults['topnav_dropdown_desc_img_default']['url'];
         $output .= sprintf("\n</ul>\n\t\t\t\n</div>\n\t\t\t\n<div class='w-col w-col-6 w-col-small-6'>\n\t\t\t\n<p class='dropdown-p'>%s</p>\n\t\t\t\n</div>\n\t\t\t\n<div class='w-col w-col-3 w-col-small-3'><img class='dropdown-img' src='%s'>\n\t\t\t\n</div>\n\t\t\t\n</div>", $text, $imgURL);
     }
     // Increments subnaviditeration so that the next button triggers the next w.row
     $subnaviditeration++;
     //I'm not sure what this does, but it was in the code I copied and I don't want to break it. :)
     parent::end_lvl($output, $depth, $args);
 }
開發者ID:brettgoodrich,項目名稱:hcsindy.webflow,代碼行數:19,代碼來源:functions.php


注:本文中的Walker::end_lvl方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。