本文整理匯總了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);
}