本文整理汇总了PHP中ilFormat::formatFloat方法的典型用法代码示例。如果您正苦于以下问题:PHP ilFormat::formatFloat方法的具体用法?PHP ilFormat::formatFloat怎么用?PHP ilFormat::formatFloat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilFormat
的用法示例。
在下文中一共展示了ilFormat::formatFloat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: replacePlaceholders
function replacePlaceholders($a_string, $a_amail, $a_lang)
{
global $ilSetting, $tree;
$tmp_lang = $this->getLng($a_lang);
// determine salutation
switch ($this->data['gender']) {
case "f":
$gender_salut = $a_amail["sal_f"];
break;
case "m":
$gender_salut = $a_amail["sal_m"];
break;
default:
$gender_salut = $a_amail["sal_g"];
}
$gender_salut = trim($gender_salut);
$a_string = str_replace("[MAIL_SALUTATION]", $gender_salut, $a_string);
$a_string = str_replace("[LOGIN]", $this->data['login'], $a_string);
$a_string = str_replace("[FIRST_NAME]", $this->data['firstname'], $a_string);
$a_string = str_replace("[LAST_NAME]", $this->data['lastname'], $a_string);
// BEGIN Mail Include E-Mail Address in account mail
$a_string = str_replace("[EMAIL]", $this->data['email'], $a_string);
$a_string = str_replace("[ILIAS_URL]", ILIAS_HTTP_PATH . "/login.php?client_id=" . CLIENT_ID, $a_string);
$a_string = str_replace("[CLIENT_NAME]", CLIENT_NAME, $a_string);
$a_string = str_replace("[ADMIN_MAIL]", $ilSetting->get("admin_email"), $a_string);
require_once './Services/Utilities/classes/class.ilFormat.php';
$a_string = str_replace("[DISK_QUOTA]", ilFormat::formatSize($this->data['disk_quota'], 'short', $tmp_lang), $a_string);
$a_string = str_replace("[DISK_USAGE]", ilFormat::formatSize($this->data['disk_usage'], 'short', $tmp_lang), $a_string);
$disk_usage_details = '';
foreach ($this->data['disk_usage_details'] as $details) {
$disk_usage_details .= ilFormat::formatFloat($details['count'], 0, true, $tmp_lang) . ' ' . $tmp_lang->txt($details['type']) . ' ' . ilFormat::formatSize($details['size'], 'short', $tmp_lang) . "\n";
}
$a_string = str_replace("[DISK_USAGE_DETAILS]", $disk_usage_details, $a_string);
return $a_string;
}