本文整理汇总了PHP中renderer_base::page_heading方法的典型用法代码示例。如果您正苦于以下问题:PHP renderer_base::page_heading方法的具体用法?PHP renderer_base::page_heading怎么用?PHP renderer_base::page_heading使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类renderer_base
的用法示例。
在下文中一共展示了renderer_base::page_heading方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: theme_bcu_get_html_for_settings
function theme_bcu_get_html_for_settings(renderer_base $output, moodle_page $page)
{
global $CFG;
$return = new stdClass();
$return->navbarclass = '';
if (!empty($page->theme->settings->invert)) {
$return->navbarclass .= ' navbar-inverse';
}
if (!empty($page->theme->settings->logo)) {
$return->heading = html_writer::link($CFG->wwwroot, '', array('title' => get_string('home'), 'class' => 'logo'));
} else {
$return->heading = $output->page_heading();
}
$return->footnote = '';
if (!empty($page->theme->settings->footnote)) {
$return->footnote = '<div class="footnote">' . $page->theme->settings->footnote . '</div>';
}
return $return;
}
示例2: theme_clean_get_html_for_settings
/**
* Returns an object containing HTML for the areas affected by settings.
*
* Do not add Clean specific logic in here, child themes should be able to
* rely on that function just by declaring settings with similar names.
*
* @param renderer_base $output Pass in $OUTPUT.
* @param moodle_page $page Pass in $PAGE.
* @return stdClass An object with the following properties:
* - navbarclass A CSS class to use on the navbar. By default ''.
* - heading HTML to use for the heading. A logo if one is selected or the default heading.
* - footnote HTML to use as a footnote. By default ''.
*/
function theme_clean_get_html_for_settings(renderer_base $output, moodle_page $page) {
global $CFG;
$return = new stdClass;
$return->navbarclass = '';
if (!empty($page->theme->settings->invert)) {
$return->navbarclass .= ' navbar-inverse';
}
if (!empty($page->theme->settings->logo)) {
$return->heading = html_writer::tag('div', '', array('class' => 'logo'));
} else {
$return->heading = $output->page_heading();
}
$return->footnote = '';
if (!empty($page->theme->settings->footnote)) {
$return->footnote = '<div class="footnote text-center">'.format_text($page->theme->settings->footnote).'</div>';
}
return $return;
}
示例3: theme_clean_get_html_for_settings
/**
* Returns an object containing HTML for the areas affected by settings.
*
* Do not add Clean specific logic in here, child themes should be able to
* rely on that function just by declaring settings with similar names.
*
* @param renderer_base $output Pass in $OUTPUT.
* @param moodle_page $page Pass in $PAGE.
* @return stdClass An object with the following properties:
* - navbarclass A CSS class to use on the navbar. By default ''.
* - heading HTML to use for the heading. A logo if one is selected or the default heading.
* - footnote HTML to use as a footnote. By default ''.
*/
function theme_clean_get_html_for_settings(renderer_base $output, moodle_page $page) {
global $CFG,$USER;
$return = new stdClass;
$return->navbarclass = '';
if (!empty($page->theme->settings->invert)) {
$return->navbarclass .= ' navbar-inverse';
}
if(isloggedin()){
$display_blocks = html_writer::empty_tag('img', array('src' => $CFG->wwwroot.'/theme/clean/pix/block_slider.jpg', 'class' => 'display_blocks'));
}else{
$display_blocks = '';
}
if (!empty($page->theme->settings->logo)) {
$return->heading = $display_blocks.html_writer::link($CFG->wwwroot, '', array('title' => get_string('home'), 'class' => 'logo'));
} else {
$return->heading = $display_blocks.$output->page_heading();
}
$return->footnote = '';
if (!empty($page->theme->settings->footnote)) {
$return->footnote = '<div class="footnote text-center">'.format_text($page->theme->settings->footnote).'</div>';
}
//added code for disclaimer and browser support by rajesh
$return->browsersupport = '';
if (!empty($page->theme->settings->browsersupport)) {
$return->browsersupport = '<div>'.format_text($page->theme->settings->browsersupport).'</div>';
} else {
$return->browsersupport = '';
}
$return->disclaimer = '';
if (!empty($page->theme->settings->disclaimer)) {
$return->disclaimer = '<div>'.format_text($page->theme->settings->disclaimer).'</div>';
} else {
$return->disclaimer = '';
}
/*code change ends here*/
return $return;
}
示例4: theme_clean_get_html_for_settings
/**
* Returns an object containing HTML for the areas affected by settings.
*
* Do not add Clean specific logic in here, child themes should be able to
* rely on that function just by declaring settings with similar names.
*
* @param renderer_base $output Pass in $OUTPUT.
* @param moodle_page $page Pass in $PAGE.
* @return stdClass An object with the following properties:
* - navbarclass A CSS class to use on the navbar. By default ''.
* - heading HTML to use for the heading. A logo if one is selected or the default heading.
* - footnote HTML to use as a footnote. By default ''.
*/
function theme_clean_get_html_for_settings(renderer_base $output, moodle_page $page)
{
global $CFG;
$return = new stdClass();
$return->navbarclass = '';
if (!empty($page->theme->settings->invert)) {
$return->navbarclass .= ' navbar-inverse';
}
// Only display the logo on the front page and login page, if one is defined.
if (!empty($page->theme->settings->logo) && ($page->pagelayout == 'frontpage' || $page->pagelayout == 'login')) {
$return->heading = html_writer::tag('div', '', array('class' => 'logo'));
} else {
$return->heading = $output->page_heading();
}
$return->footnote = '';
if (!empty($page->theme->settings->footnote)) {
$return->footnote = '<div class="footnote text-center">' . format_text($page->theme->settings->footnote) . '</div>';
}
return $return;
}
示例5: theme_warwickclean_get_html_for_settings
/**
* Returns an object containing HTML for the areas affected by settings.
*
* @param renderer_base $output Pass in $OUTPUT.
* @param moodle_page $page Pass in $PAGE.
* @return stdClass An object with the following properties:
* - navbarclass A CSS class to use on the navbar. By default ''.
* - heading HTML to use for the heading. A logo if one is selected or the default heading.
* - footnote HTML to use as a footnote. By default ''.
*/
function theme_warwickclean_get_html_for_settings(renderer_base $output, moodle_page $page)
{
global $CFG;
$return = new stdClass();
$return->navbarclass = '';
if (!empty($page->theme->settings->invert)) {
$return->navbarclass .= ' navbar-inverse';
}
if (!empty($page->theme->settings->logo)) {
$return->heading = html_writer::link($CFG->wwwroot, '', array('title' => get_string('home'), 'class' => 'logo'));
} else {
$return->heading = $output->page_heading();
}
$return->footnote = '';
if (!empty($page->theme->settings->footnote)) {
$return->footnote = '<div class="footnote text-center">' . $page->theme->settings->footnote . '</div>';
}
$return->warningcolor = '';
if (!empty($page->theme->settings->warningcolor)) {
$return->warningcolor = $page->theme->settings->warningcolor;
}
$return->warningmessage = '';
if (!empty($page->theme->settings->warningmessage)) {
//$return->warningmessage = '<div class="warning-message text-center mdl_alert_'.$return->warningcolor.'">'.$page->theme->settings->warningmessage.'</div>';
$return->warningmessage = html_writer::tag('div', $page->theme->settings->warningmessage, array('class' => 'warning-message text-center mdl_alert_' . $return->warningcolor));
}
return $return;
}
示例6: theme_roshnilite_get_html_for_settings
/**
* Returns an object containing HTML for the areas affected by settings.
*
* Do not add roshnilite specific logic in here, child themes should be able to
* rely on that function just by declaring settings with similar names.
*
* @param renderer_base $output Pass in $OUTPUT.
* @param moodle_page $page Pass in $PAGE.
* @return stdClass An object with the following properties:
* - navbarclass A CSS class to use on the navbar. By default ''.
* - heading HTML to use for the heading. A logo if one is selected or the default heading.
* - footnote HTML to use as a footnote. By default ''.
*/
function theme_roshnilite_get_html_for_settings(renderer_base $output, moodle_page $page) {
global $CFG, $USER;
$return = new stdClass;
$return->navbarclass = '';
if (!empty($page->theme->settings->invert)) {
$return->navbarclass .= ' navbar-inverse';
}
if (!empty($page->theme->settings->logo)) {
$return->heading = html_writer::tag('div', '', array('class' => 'logo'));
} else {
$return->heading = $output->page_heading();
}
$return->footnote = '';
if (!empty($page->theme->settings->footnote)) {
$return->footnote = '<div class="footnote text-center">'.format_text($page->theme->settings->footnote).'</div>';
}
/*-----------------------for contact*--------------------------*/
if (!empty($page->theme->settings->addressfontawesomeicon)) {
$return->addressfontawesomeicon = $page->theme->settings->addressfontawesomeicon;
}
if (!empty($page->theme->settings->emailfontawesomeicon)) {
$return->emailfontawesomeicon = $page->theme->settings->emailfontawesomeicon;
}
if (!empty($page->theme->settings->phonefontawesomeicon)) {
$return->phonefontawesomeicon = $page->theme->settings->phonefontawesomeicon;
}
if (!empty($page->theme->settings->address)) {
$return->address = $page->theme->settings->address;
}
if (!empty($page->theme->settings->phone)) {
$return->phone = $page->theme->settings->phone;
}
if (!empty($page->theme->settings->email)) {
$return->email = $page->theme->settings->email;
}
/*-----------------------for social contact*--------------------------*/
if (!empty($page->theme->settings->socialheading)) {
$return->socialheading = $page->theme->settings->socialheading;
}
if (!empty($page->theme->settings->masonrysubheading)) {
$return->masonrysubheading = $page->theme->settings->masonrysubheading;
}
if (!empty($page->theme->settings->socialfontawesomeicon1)) {
$return->socialfontawesomeicon1 = $page->theme->settings->socialfontawesomeicon1;
}
if (!empty($page->theme->settings->socialicon1)) {
$return->socialicon1 = $page->theme->settings->socialicon1;
}
if (!empty($page->theme->settings->socialfontawesomeicon2)) {
$return->socialfontawesomeicon2 = $page->theme->settings->socialfontawesomeicon2;
}
if (!empty($page->theme->settings->socialicon2)) {
$return->socialicon2 = $page->theme->settings->socialicon2;
}
if (!empty($page->theme->settings->socialfontawesomeicon3)) {
$return->socialfontawesomeicon3 = $page->theme->settings->socialfontawesomeicon3;
}
if (!empty($page->theme->settings->socialicon3)) {
$return->socialicon3 = $page->theme->settings->socialicon3;
}
if (!empty($page->theme->settings->socialfontawesomeicon4)) {
$return->socialfontawesomeicon4 = $page->theme->settings->socialfontawesomeicon4;
}
if (!empty($page->theme->settings->socialicon4)) {
$return->socialicon4 = $page->theme->settings->socialicon4;
}
/*--------------------for masonry--------------------------------*/
if (!empty($page->theme->settings->masonryheading)) {
$return->masonryheading = $page->theme->settings->masonryheading;
}
if (!empty($page->theme->settings->masonrysubheading)) {
$return->masonrysubheading = $page->theme->settings->masonrysubheading;
}
if (!empty($page->theme->settings->masonrytext1)) {
$return->masonrytext1 = $page->theme->settings->masonrytext1;
}
if (!empty($page->theme->settings->masonrysubtext1)) {
$return->masonrysubtext1 = $page->theme->settings->masonrysubtext1;
}
if (!empty($page->theme->settings->masonryrurl1)) {
$return->masonryurl1 = $page->theme->settings->masonryrurl1;
}
if (!empty($page->theme->settings->masonrytext2)) {
//.........这里部分代码省略.........
示例7: theme_mmcmonkwearmouth_get_html_for_settings
/**
* Returns an object containing HTML for the areas affected by settings.
*
* Do not add mmcmonkwearmouth specific logic in here, child themes should be able to
* rely on that function just by declaring settings with similar names.
*
* @param renderer_base $output Pass in $OUTPUT.
* @param moodle_page $page Pass in $PAGE.
* @return stdClass An object with the following properties:
* - navbarclass A CSS class to use on the navbar. By default ''.
* - heading HTML to use for the heading. A logo if one is selected or the default heading.
* - footnote HTML to use as a footnote. By default ''.
*/
function theme_mmcmonkwearmouth_get_html_for_settings(renderer_base $output, moodle_page $page)
{
global $CFG;
$toReturn = new stdClass();
$toReturn->navbarclass = '';
if (!empty($page->theme->settings->logo)) {
$toReturn->heading = html_writer::link($CFG->wwwroot, html_writer::img($output->pix_url('logo', 'theme'), 'logo', array('title' => get_string('home'), 'class' => 'logo')) . html_writer::tag('h3', 'Monkwearmouth Academy'));
} else {
$toReturn->heading = $output->page_heading();
}
$toReturn->footnote = '';
if (!empty($page->theme->settings->footnote)) {
$toReturn->footnote = '<div class="footnote text-center">' . format_text($page->theme->settings->footnote) . '</div>';
}
return $toReturn;
}
示例8: theme_iomad_get_html_for_settings
/**
* Returns an object containing HTML for the areas affected by settings.
*
* @param renderer_base $output Pass in $OUTPUT.
* @param moodle_page $page Pass in $PAGE.
* @return stdClass An object with the following properties:
* - navbarclass A CSS class to use on the navbar. By default ''.
* - heading HTML to use for the heading. A logo if one is selected or the default heading.
* - footnote HTML to use as a footnote. By default ''.
*/
function theme_iomad_get_html_for_settings(renderer_base $output, moodle_page $page)
{
global $CFG, $USER, $DB;
$return = new stdClass();
$return->navbarclass = '';
if (!empty($page->theme->settings->invert)) {
$return->navbarclass .= ' navbar-inverse';
}
// get logos
$theme = $page->theme;
$logo = $theme->setting_file_url('logo', 'logo');
if (empty($logo)) {
$logo = $CFG->wwwroot . '/theme/iomad/pix/iomad_logo.png';
}
$clientlogo = '';
$companycss = '';
if ($companyid = iomad::is_company_user()) {
$context = context_system::instance();
if ($files = $DB->get_records('files', array('contextid' => $context->id, 'component' => 'theme_iomad', 'filearea' => 'companylogo', 'itemid' => $companyid))) {
foreach ($files as $file) {
if ($file->filename != '.') {
$clientlogo = $CFG->wwwroot . "/pluginfile.php/{$context->id}/theme_iomad/companylogo/{$companyid}/{$file->filename}";
}
}
}
company_user::load_company();
$companycss = ".header, .navbar { background: [[company:bgcolor_header]]; }\n .block .content { background: [[company:bgcolor_content]]; }";
foreach ($USER->company as $key => $value) {
if (isset($value)) {
$companycss = preg_replace("/\\[\\[company:{$key}\\]\\]/", $value, $companycss);
}
}
}
$return->heading = '<div id="sitelogo">' . '<a href="' . $CFG->wwwroot . '" ><img src="' . $logo . '" /></a></div>';
$return->heading .= '<div id="siteheading">' . $output->page_heading() . '</div>';
if ($clientlogo) {
$return->heading .= '<div id="clientlogo">' . '<a href="' . $CFG->wwwroot . '" ><img src="' . $clientlogo . '" /></a></div>';
}
$return->footnote = '';
if (!empty($page->theme->settings->footnote)) {
$return->footnote = '<div class="footnote text-center">' . $page->theme->settings->footnote . '</div>';
}
$return->companycss = $companycss;
return $return;
}
示例9: theme_morecandy_get_html_for_settings
/**
* Returns an object containing HTML for the areas affected by settings.
*
* Do not add theme specific logic in here, child themes should be able to
* rely on that function just by declaring settings with similar names.
*
* @param renderer_base $output Pass in $OUTPUT.
* @param moodle_page $page Pass in $PAGE.
* @return stdClass An object with the following properties:
* - navbarclass A CSS class to use on the navbar. By default ''.
* - heading HTML to use for the heading. A logo if one is selected or the default heading.
* - footnote HTML to use as a footnote. By default ''.
*/
function theme_morecandy_get_html_for_settings(renderer_base $output, moodle_page $page)
{
global $CFG, $SITE;
$return = new stdClass();
$return->branding = '';
if (empty($page->theme->settings->brandicon)) {
$return->branding = format_string($SITE->shortname, true, array('context' => context_course::instance(SITEID)));
}
if (!empty($page->theme->settings->logo)) {
$return->heading = '<div class="logo"></div>';
} else {
$return->heading = $output->page_heading();
}
$return->welcomenote = '';
if (!empty($page->theme->settings->welcomenote)) {
$return->welcomenote = '<div class="row-fluid">' . format_text($page->theme->settings->welcomenote) . '</div>';
}
$return->footnote = '';
if (!empty($page->theme->settings->footnote)) {
$return->footnote = '<div class="footnote text-center">' . format_text($page->theme->settings->footnote) . '</div>';
}
return $return;
}
示例10: theme_pioneer_get_html_for_fptextbox
function theme_pioneer_get_html_for_fptextbox(renderer_base $output, moodle_page $page)
{
global $CFG;
$return = new stdClass();
$return->heading = $output->page_heading();
$return->fptextbox = '';
if (!empty($page->theme->settings->fptextbox)) {
$return->fptextbox = '<div class="fptextbox">' . format_text($page->theme->settings->fptextbox) . '</div>';
}
return $return;
}
示例11: theme_learnmoodle_get_html_for_settings
/**
* Returns an object containing HTML for the areas affected by settings.
*
* @param renderer_base $output Pass in $OUTPUT.
* @param moodle_page $page Pass in $PAGE.
* @return stdClass An object with the following properties:
* - navbarclass A CSS class to use on the navbar. By default ''.
* - heading HTML to use for the heading. A logo if one is selected or the default heading.
* - footnote HTML to use as a footnote. By default ''.
*/
function theme_learnmoodle_get_html_for_settings(renderer_base $output, moodle_page $page)
{
global $CFG, $SITE;
$return = new stdClass();
$return->navbarclass = '';
if (!empty($page->theme->settings->invert)) {
$return->navbarclass .= ' navbar-inverse';
}
$heading = $output->page_heading('h1');
if ($heading === html_writer::tag('h1', $SITE->fullname)) {
$return->heading = '';
} else {
$return->heading = $heading;
}
$return->footnote = '';
if (!empty($page->theme->settings->footnote)) {
$return->footnote = '<div class="footnote text-center">' . $page->theme->settings->footnote . '</div>';
}
return $return;
}