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