本文整理匯總了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>";
}
}