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


PHP core_renderer::pix_url方法代码示例

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


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

示例1: get_direction_icon

 /**
  * Gets the direction icon for the sortable field within this table
  *
  * @param core_renderer $output
  * @param string $field
  * @return string
  */
 protected function get_direction_icon($output, $field)
 {
     $direction = self::DEFAULTSORTDIRECTION;
     if ($this->sort == $field) {
         $direction = $this->sortdirection;
     }
     if ($direction === 'ASC') {
         return html_writer::empty_tag('img', array('alt' => '', 'src' => $output->pix_url('t/down')));
     } else {
         return html_writer::empty_tag('img', array('alt' => '', 'src' => $output->pix_url('t/up')));
     }
 }
开发者ID:nfreear,项目名称:moodle,代码行数:19,代码来源:renderer.php

示例2: init_requirements_data

 /**
  * Initialise with the bits of JavaScript that every Moodle page should have.
  *
  * @param moodle_page $page
  * @param core_renderer $output
  */
 protected function init_requirements_data(moodle_page $page, core_renderer $renderer)
 {
     global $CFG;
     // JavaScript should always work with $CFG->httpswwwroot rather than $CFG->wwwroot.
     // Otherwise, in some situations, users will get warnings about insecure content
     // on secure pages from their web browser.
     $this->M_cfg = array('wwwroot' => $CFG->httpswwwroot, 'sesskey' => sesskey(), 'loadingicon' => $renderer->pix_url('i/loading_small', 'moodle')->out(false), 'themerev' => theme_get_revision(), 'theme' => $page->theme->name, 'jsrev' => (empty($CFG->cachejs) or empty($CFG->jsrev)) ? -1 : $CFG->jsrev);
     if (debugging('', DEBUG_DEVELOPER)) {
         $this->M_cfg['developerdebug'] = true;
         $this->yui2_lib('logger');
     }
     // accessibility stuff
     $this->skip_link_to('maincontent', get_string('tocontent', 'access'));
     // to be removed soon
     $this->yui2_lib('dom');
     // at least javascript-static.js needs to be migrated to YUI3
     $this->string_for_js('confirmation', 'admin');
     $this->string_for_js('cancel', 'moodle');
     $this->string_for_js('yes', 'moodle');
     if ($page->pagelayout === 'frametop') {
         $this->js_init_call('M.util.init_frametop');
     }
 }
开发者ID:richheath,项目名称:moodle,代码行数:29,代码来源:outputrequirementslib.php

示例3: init_requirements_data

 /**
  * Initialise with the bits of JavaScript that every Moodle page should have.
  *
  * @param moodle_page $page
  * @param core_renderer $renderer
  */
 protected function init_requirements_data(moodle_page $page, core_renderer $renderer)
 {
     global $CFG;
     // JavaScript should always work with $CFG->httpswwwroot rather than $CFG->wwwroot.
     // Otherwise, in some situations, users will get warnings about insecure content
     // on secure pages from their web browser.
     $this->M_cfg = array('wwwroot' => $CFG->httpswwwroot, 'sesskey' => sesskey(), 'loadingicon' => $renderer->pix_url('i/loading_small', 'moodle')->out(false), 'themerev' => theme_get_revision(), 'slasharguments' => (int) (!empty($CFG->slasharguments)), 'theme' => $page->theme->name, 'jsrev' => (empty($CFG->cachejs) or empty($CFG->jsrev)) ? -1 : $CFG->jsrev, 'svgicons' => $page->theme->use_svg_icons());
     if (debugging('', DEBUG_DEVELOPER)) {
         $this->M_cfg['developerdebug'] = true;
     }
     if (defined('BEHAT_SITE_RUNNING')) {
         $this->M_cfg['behatsiterunning'] = true;
     }
     // Accessibility stuff.
     $this->skip_link_to('maincontent', get_string('tocontent', 'access'));
     // Add strings used on many pages.
     $this->string_for_js('confirmation', 'admin');
     $this->string_for_js('cancel', 'moodle');
     $this->string_for_js('yes', 'moodle');
     // Alter links in top frame to break out of frames.
     if ($page->pagelayout === 'frametop') {
         $this->js_init_call('M.util.init_frametop');
     }
     // Include block drag/drop if editing is on
     if ($page->user_is_editing()) {
         $params = array('courseid' => $page->course->id, 'pagetype' => $page->pagetype, 'pagelayout' => $page->pagelayout, 'subpage' => $page->subpage, 'regions' => $page->blocks->get_regions(), 'contextid' => $page->context->id);
         if (!empty($page->cm->id)) {
             $params['cmid'] = $page->cm->id;
         }
         $page->requires->yui_module('moodle-core-blocks', 'M.core_blocks.init_dragdrop', array($params), null, true);
     }
 }
开发者ID:masaterutakeno,项目名称:MoodleMobile,代码行数:38,代码来源:outputrequirementslib.php

示例4: init_requirements_data

 /**
  * Initialise with the bits of JavaScript that every Moodle page should have.
  *
  * @param moodle_page $page
  * @param core_renderer $renderer
  */
 protected function init_requirements_data(moodle_page $page, core_renderer $renderer)
 {
     global $CFG;
     // JavaScript should always work with $CFG->httpswwwroot rather than $CFG->wwwroot.
     // Otherwise, in some situations, users will get warnings about insecure content
     // on secure pages from their web browser.
     $this->M_cfg = array('wwwroot' => $CFG->httpswwwroot, 'sesskey' => sesskey(), 'loadingicon' => $renderer->pix_url('i/loading_small', 'moodle')->out(false), 'themerev' => theme_get_revision(), 'slasharguments' => (int) (!empty($CFG->slasharguments)), 'theme' => $page->theme->name, 'jsrev' => (empty($CFG->cachejs) or empty($CFG->jsrev)) ? -1 : $CFG->jsrev);
     if (debugging('', DEBUG_DEVELOPER)) {
         $this->M_cfg['developerdebug'] = true;
     }
     // Accessibility stuff.
     $this->skip_link_to('maincontent', get_string('tocontent', 'access'));
     // Add strings used on many pages.
     $this->string_for_js('confirmation', 'admin');
     $this->string_for_js('cancel', 'moodle');
     $this->string_for_js('yes', 'moodle');
     // Alter links in top frame to break out of frames.
     if ($page->pagelayout === 'frametop') {
         $this->js_init_call('M.util.init_frametop');
     }
 }
开发者ID:JP-Git,项目名称:moodle,代码行数:27,代码来源:outputrequirementslib.php


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