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


PHP renderer_base::prepare_classes方法代碼示例

本文整理匯總了PHP中renderer_base::prepare_classes方法的典型用法代碼示例。如果您正苦於以下問題:PHP renderer_base::prepare_classes方法的具體用法?PHP renderer_base::prepare_classes怎麽用?PHP renderer_base::prepare_classes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在renderer_base的用法示例。


在下文中一共展示了renderer_base::prepare_classes方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: print_heading_block

/**
 * Output a standard heading block
 *
 * @deprecated
 * @param string $heading The text to write into the heading
 * @param string $class An additional Class Attr to use for the heading
 * @param bool $return If set to true output is returned rather than echoed, default false
 * @return string|void HTML String if return=true nothing otherwise
 */
function print_heading_block($heading, $class='', $return=false) {
    global $OUTPUT;
    debugging('print_heading_with_block() has been deprecated. Please change your code to use $OUTPUT->heading().');
    $output = $OUTPUT->heading($heading, 2, 'headingblock header ' . renderer_base::prepare_classes($class));
    if ($return) {
        return $output;
    } else {
        echo $output;
    }
}
開發者ID:nuckey,項目名稱:moodle,代碼行數:19,代碼來源:deprecatedlib.php

示例2: container_start

 /**
  * Outputs the opening section of a container.
  *
  * @param string $classes A space-separated list of CSS classes
  * @param string $id An optional ID
  * @return string the HTML to output.
  */
 public function container_start($classes = null, $id = null) {
     $this->opencontainers->push('container', html_writer::end_tag('div'));
     return html_writer::start_tag('div', array('id' => $id,
             'class' => renderer_base::prepare_classes($classes)));
 }
開發者ID:afgal,項目名稱:moodle-1,代碼行數:12,代碼來源:outputrenderers.php

示例3: notification

 /**
  * Generates and returns HTML code to display information about the rubric editor.
  *
  * @param string $message The message to print out
  * @param string $classes The classes for the returned div
  * @return string The HTML to output.
  */
 public function notification($message, $classes = 'notifyproblem')
 {
     return html_writer::tag('div', clean_text($message), array('class' => renderer_base::prepare_classes($classes)));
 }
開發者ID:johndimopoulos,項目名稱:moodle-gradingform_erubric,代碼行數:11,代碼來源:renderer.php

示例4: notification

 /**
  * Renders a notification
  *
  * @param string $message
  * @param string $classes
  * @return string
  */
 public function notification($message, $classes = 'notifyproblem') {
     return html_writer::tag('div', clean_text($message), array('data-role'=>'none', 'data-icon'=>'alert', 'data-theme'=>'d', 'class' => renderer_base::prepare_classes($classes)));
 }
開發者ID:nigeli,項目名稱:moodle,代碼行數:10,代碼來源:renderers.php

示例5: notification

 public function notification($message, $classes = 'notifyproblem')
 {
     $classes = renderer_base::prepare_classes($classes);
     $classes = str_replace(array('notifyproblem', 'notifysuccess', 'notifymessage', 'redirectmessage'), array('alert alert-danger', 'alert alert-success', 'alert alert-info', 'alert alert-block alert-info'), $classes);
     return parent::notification($message, $classes);
 }
開發者ID:nbartley,項目名稱:moodle-theme_snap,代碼行數:6,代碼來源:core_renderer.php


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