本文整理汇总了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')));
}
}
示例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');
}
}
示例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);
}
}
示例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');
}
}