當前位置: 首頁>>代碼示例>>PHP>>正文


PHP renderer_base::page_heading方法代碼示例

本文整理匯總了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;
}
開發者ID:JOANMM,項目名稱:bcu,代碼行數:19,代碼來源:lib.php

示例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;
}
開發者ID:anilch,項目名稱:Personel,代碼行數:35,代碼來源:lib.php

示例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;
}
開發者ID:narasimhaeabyas,項目名稱:tataaiapro,代碼行數:57,代碼來源:lib.php

示例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;
}
開發者ID:evltuma,項目名稱:moodle,代碼行數:33,代碼來源:lib.php

示例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;
}
開發者ID:digitalquest,項目名稱:moodle_themex,代碼行數:38,代碼來源:lib.php

示例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)) {
//.........這裏部分代碼省略.........
開發者ID:RicardoBorgesGO,項目名稱:moodle-theme,代碼行數:101,代碼來源:lib.php

示例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;
}
開發者ID:markmcdermid,項目名稱:mmcmonkwearmouth,代碼行數:29,代碼來源:lib.php

示例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;
}
開發者ID:sumitnegi933,項目名稱:Moodle_lms_New,代碼行數:55,代碼來源:lib.php

示例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;
}
開發者ID:scara,項目名稱:moodle-theme_morecandy,代碼行數:36,代碼來源:lib.php

示例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;
}
開發者ID:kennibc,項目名稱:moodle-theme_pioneer,代碼行數:11,代碼來源:lib.php

示例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;
}
開發者ID:sabdullah98,項目名稱:moodle-theme_learnmoodle,代碼行數:30,代碼來源:lib.php


注:本文中的renderer_base::page_heading方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。