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