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


PHP html::li方法代码示例

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


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

示例1: expected_link

 private function expected_link($text, $number = null)
 {
     if ($number === null) {
         $number = $text;
     }
     $var = $number - 1;
     $attributes['href'] = "example.com?one=fish&two=fish&page={$var}";
     return html::li('', html::a($attributes, $text));
 }
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:9,代码来源:bootstrap_pager_test.php

示例2: sign_up_sign_in

 public static function sign_up_sign_in($url)
 {
     // TODO: add sign in as guest.
     $dropdown_content = array('class' => 'dropdown-menu', 'style' => 'padding: 15px; padding-bottom: 0px;');
     $form = array('method' => 'post', 'action' => $url, 'accept-charset' => 'UTF-8');
     $username = array('type' => 'text', 'placeholder' => 'Username', 'id' => 'username', 'name' => 'username');
     $password = array('type' => 'password', 'placeholder' => 'Password', 'id' => 'password', 'name' => 'password');
     $submit = array('value' => 'Sign In', 'class' => 'btn btn-primary btn-block', 'id' => 'sign-in');
     return html::ul('nav pull-right', html::li(html::a(new moodle_url('/login/signup.php'), 'Sign Up')) . bootstrap::list_divider() . bootstrap::dropdown('Sign In', html::div($dropdown_content, html::form($form, html::input($username) . html::input($password) . html::checkbox('rememberusername', 'Remember username') . html::submit($submit)))));
 }
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:10,代码来源:bootsnipp.php

示例3: test_li_with_attributes_and_empty_string_args

 public function test_li_with_attributes_and_empty_string_args()
 {
     $attributes = array('class' => 'test', 'data' => '0101');
     $actual = html::li($attributes, '');
     $expected = '<li class=test data=0101></li>';
     $this->assertSame($expected, $actual);
 }
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:7,代码来源:html_test.php

示例4: render_custom_menu_item

 protected function render_custom_menu_item(custom_menu_item $menunode, $submenu = null)
 {
     if ('list_divider' === $menunode->get_text()) {
         return bootstrap::list_divider();
     }
     if (!$menunode->has_children()) {
         return $this->render_custom_menu_leaf($menunode);
     }
     foreach ($menunode->get_children() as $child) {
         $items[] = $this->render_custom_menu_item($child, true);
     }
     if ($submenu === true) {
         return html::li(bootstrap::dropdown_submenu($menunode->get_text(), $items));
     } else {
         return html::li(bootstrap::dropdown_menu($menunode->get_text(), $items));
     }
 }
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:17,代码来源:core_renderer.php

示例5: li_icon_link

 public static function li_icon_link($href, $icon, $text)
 {
     return html::li(self::icon_link($href, $icon, $text));
 }
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:4,代码来源:bootstrap.php

示例6: skipped

 private function skipped()
 {
     return html::li('disabled', html::span('...'));
 }
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:4,代码来源:bootstrap_pager.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: navigation_tree

 public function navigation_tree(global_navigation $navigation, $expansionlimit, array $options = array())
 {
     $navigation->add_class('navigation_node');
     $content = $this->navigation_node(array($navigation), array('class' => 'block_tree list nav nav-list'), $expansionlimit, $options);
     if (!isset($navigation->id) && !is_numeric($navigation->id) && !empty($content)) {
         $attributes = array('class' => 'block_tree_box', 'id' => $navigation->id);
         $content = html::li($attributes, $content);
     }
     return $content;
 }
开发者ID:rbclark,项目名称:moodle-theme_bootstrap_renderers,代码行数:10,代码来源:block_navigation_renderer.php

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