當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。