本文整理汇总了PHP中site_status::severity_class方法的典型用法代码示例。如果您正苦于以下问题:PHP site_status::severity_class方法的具体用法?PHP site_status::severity_class怎么用?PHP site_status::severity_class使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类site_status
的用法示例。
在下文中一共展示了site_status::severity_class方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get
/**
* Get any pending messages. There are two types of messages, transient and permanent.
* Permanent messages are used to let the admin know that there are pending administrative
* issues that need to be resolved. Transient ones are only displayed once.
* @return html text
*/
static function get()
{
if (!identity::active_user()->admin) {
return;
}
$buf = array();
foreach (ORM::factory("message")->find_all() as $msg) {
$value = str_replace("__CSRF__", access::csrf_token(), $msg->value);
$buf[] = "<li class=\"" . site_status::severity_class($msg->severity) . "\">{$value}</li>";
}
if ($buf) {
return "<ul id=\"g-site-status\">" . implode("", $buf) . "</ul>";
}
}