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


PHP renderer_base::render_skip_links方法代码示例

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


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

示例1: get_top_of_body_code

 /**
  * Generate any HTML that needs to go at the start of the <body> tag.
  *
  * Normally, this method is called automatically by the code that prints the
  * <head> tag. You should not normally need to call it in your own code.
  *
  * @param renderer_base $renderer
  * @return string the HTML code to go at the start of the <body> tag.
  */
 public function get_top_of_body_code(renderer_base $renderer)
 {
     // First the skip links.
     $output = $renderer->render_skip_links($this->skiplinks);
     // YUI3 JS needs to be loaded early in the body. It should be cached well by the browser.
     $output .= $this->get_yui3lib_headcode();
     // Add hacked jQuery support, it is not intended for standard Moodle distribution!
     $output .= $this->get_jquery_headcode();
     // Link our main JS file, all core stuff should be there.
     $output .= html_writer::script('', $this->js_fix_url('/lib/javascript-static.js'));
     // All the other linked things from HEAD - there should be as few as possible.
     if ($this->jsincludes['head']) {
         foreach ($this->jsincludes['head'] as $url) {
             $output .= html_writer::script('', $url);
         }
     }
     // Then the clever trick for hiding of things not needed when JS works.
     $output .= html_writer::script("document.body.className += ' jsenabled';") . "\n";
     $this->topofbodydone = true;
     return $output;
 }
开发者ID:gabrielrosset,项目名称:moodle,代码行数:30,代码来源:outputrequirementslib.php


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