当前位置: 首页>>代码示例>>PHP>>正文


PHP html::ul方法代码示例

本文整理汇总了PHP中html::ul方法的典型用法代码示例。如果您正苦于以下问题:PHP html::ul方法的具体用法?PHP html::ul怎么用?PHP html::ul使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在html的用法示例。


在下文中一共展示了html::ul方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: progress_bar

 public function progress_bar(array $items)
 {
     foreach ($items as $step) {
         if ($step['class'] == 'backup_stage backup_stage_current') {
             $steps[] = html::span(label::inverse($step['text']));
         } else {
             $steps[] = html::span($step['text']);
         }
     }
     return html::ul('breadcrumb', '<li>' . implode('&nbsp;>&nbsp;</li><li>', $steps) . '</li>');
     //TODO: there's better bootstrap wizard progress out there, but this'll do for now
 }
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:12,代码来源:core_backup_renderer.php

示例2: signed_in

 public static function signed_in($user, $loginfailures, $mnet, $real, $role_switch, $logout)
 {
     $links[] = bootstrap::li_icon_link($user['link'], 'user', 'Profile');
     if ($mnet !== null) {
         $links[] = bootstrap::li_icon_link($mnet['link'], 'globe', $mnet['name']);
     }
     if (isset($loginfailures)) {
         $links[] = bootstrap::li_icon_link($loginfailures['link'], 'warning-sign', $loginfailures['name']);
         $user['name'] .= ' ' . bootstrap::icon('warning-sign');
     }
     if ($role_switch !== null) {
         $links[] = bootstrap::li_icon_link($role_switch['link'], 'repeat', $role_switch['name']);
     }
     if ($real !== null) {
         $links[] = bootstrap::li_icon_link($real['link'], 'user', $real['name']);
     }
     $links[] = bootstrap::list_divider();
     $links[] = bootstrap::li_icon_link($logout['link'], 'off', $logout['name']);
     return html::ul('nav pull-right', bootstrap::dropdown_menu($user['name'], $links));
 }
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:20,代码来源:bootsnipp.php

示例3: render_topic

 /**
  * Render legend
  *
  * @param string $topic
  */
 public static function render_topic($topic = null)
 {
     if (empty($topic)) {
         $data = self::$topics;
     } else {
         $data = [$topic => self::$topics[$topic]];
     }
     $temp = [];
     foreach ($data as $k => $v) {
         if (isset($v['options'])) {
             $value = html::a(['href' => $v['href'], 'value' => $v['name']]);
             $temp2 = [];
             foreach ($v['options'] as $k2 => $v2) {
                 $temp2[] = html::a(['href' => $v2['href'], 'value' => $v2['name']]);
             }
             $value .= html::ul(['options' => $temp2]);
             $temp[] = $value;
         } else {
             $temp[] = html::a(['href' => $v['href'], 'value' => $v['name']]);
         }
     }
     echo html::ul(['options' => $temp]);
 }
开发者ID:volodymyr-volynets,项目名称:frontend,代码行数:28,代码来源:dev.php

示例4: render_custom_menu

 protected function render_custom_menu(custom_menu $menu)
 {
     foreach ($menu->get_children() as $item) {
         $items[] = $this->render_custom_menu_item($item);
     }
     if (isset($items)) {
         return html::ul('nav', $items);
     } else {
         return '';
     }
 }
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:11,代码来源:core_renderer.php

示例5: menu

 private static function menu($items)
 {
     $attributes = array('class' => 'dropdown-menu', 'role' => 'menu', 'aria-labelledby' => 'dropdownMenu');
     return html::ul($attributes, $items);
 }
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:5,代码来源:bootstrap.php

示例6: msg

 public static function msg($messages, $type = 'notice')
 {
     $html[] = '<div class="zotop-msg clearfix ' . $type . '">';
     $html[] = '	<div class="zotop-msg-icon"><div class="zotop-icon zotop-icon-' . $type . '"></div></div>';
     $html[] = '	<div class="zotop-msg-content">';
     $html[] = is_array($messages) ? html::ul($messages) : $messages;
     $html[] = '	</div>';
     $html[] = '</div>';
     return implode("\n", $html);
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:10,代码来源:admin.core.php

示例7: required_column

 /**
  * Formats the information that needs to go in the 'Requires' column.
  * @param plugininfo_base $plugin the plugin we are rendering the row for.
  * @param plugin_manager $pluginman provides data on all the plugins.
  * @param string $version
  * @return string HTML code
  */
 protected function required_column(plugininfo_base $plugin, plugin_manager $pluginman, $version)
 {
     $requires = array();
     if (!empty($plugin->versionrequires)) {
         $required = get_string('moodleversion', 'core_plugin', $plugin->versionrequires);
         if ($plugin->versionrequires > $version) {
             $required = label::important($required);
         }
         $requires[] = html::li($required);
     }
     foreach ($plugin->get_other_required_plugins() as $component => $requiredversion) {
         $ok = true;
         $otherplugin = $pluginman->get_plugin_info($component);
         if (is_null($otherplugin)) {
             $ok = false;
         } else {
             if ($requiredversion != ANY_VERSION and $otherplugin->versiondisk < $requiredversion) {
                 $ok = false;
             }
         }
         if ($requiredversion != ANY_VERSION) {
             $required = get_string('otherpluginversion', 'core_plugin', array('component' => $component, 'version' => $requiredversion));
         } else {
             $required = get_string('otherplugin', 'core_plugin', array('component' => $component, 'version' => $requiredversion));
         }
         if (!$ok) {
             $required = label::important($required);
         }
         $requires[] = html::li($required);
     }
     if (!$requires) {
         return '';
     }
     return html::ul('unstyled', $requires);
 }
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:42,代码来源:core_admin_renderer.php

示例8: disabled_navigation_node

 protected function disabled_navigation_node(navigation_node $node, $wrap = true)
 {
     $items = $node->children;
     if ($items->count() == 0) {
         return '';
     }
     foreach ($items as $item) {
         if (!$item->display) {
             continue;
         }
         $isbranch = $item->children->count() > 0 || $item->nodetype == navigation_node::NODETYPE_BRANCH;
         if ($isbranch) {
             $item->hideicon = true;
         }
         $content = $this->output->render($item);
         $classes = 'tree_item';
         $expanded = 'true';
         if (!$item->forceopen || !$item->forceopen && $item->collapse || $item->children->count() == 0 && $item->nodetype == navigation_node::NODETYPE_BRANCH) {
             $classes = classes::add_to($classes, 'collapsed');
             if ($isbranch) {
                 $expanded = "false";
                 $classes = classes::add_to($classes, 'branch');
             }
         }
         if ($item->isactive === true) {
             $classes = classes::add_to($classes, 'active');
         }
         $attributes = array('class' => $classes, 'aria-expanded' => $expanded);
         $content .= $this->navigation_node($item);
         $lis[] = html::li($attributes, $content);
     }
     $output = implode($lis);
     if ($wrap) {
         return html::ul('nav nav-list block_tree', $output);
     }
     return $output;
 }
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:37,代码来源:block_settings_renderer.php

示例9: tolist

 static function tolist($list, $type, $style = null)
 {
     $html_list = '';
     foreach ($list as $url => $value) {
         if (is_array($value)) {
             $row = html::tolist($value, $type, $style);
         } else {
             $row = $value;
         }
         $html_list .= html::a(html::li($row), "href='{$url}'");
     }
     switch ($type) {
         case 'ol':
             $html_list = html::ol($html_list, "type='{$style}'");
             break;
         case 'ul':
             $html_list = html::ul($html_list, "style='list-style-type:{$style}'");
             break;
         default:
             $html_list = html::ul($html_list, "style='list-style-type:none'");
             break;
     }
     return $html_list;
 }
开发者ID:AdBouli,项目名称:LMD,代码行数:24,代码来源:html.php


注:本文中的html::ul方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。