本文整理汇总了PHP中Contract::getContractRenewalName方法的典型用法代码示例。如果您正苦于以下问题:PHP Contract::getContractRenewalName方法的具体用法?PHP Contract::getContractRenewalName怎么用?PHP Contract::getContractRenewalName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contract
的用法示例。
在下文中一共展示了Contract::getContractRenewalName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: giveItem
//.........这里部分代码省略.........
}
if (!empty($data[$NAME . $num])) {
$split = explode("\$\$\$\$", $data[$NAME . $num]);
$count_display = 0;
for ($k = 0; $k < count($split); $k++) {
$lowstr = utf8_strtolower($split[$k]);
if (strlen(trim($split[$k])) > 0 && !in_array($lowstr, $displayed)) {
if ($count_display) {
$out .= "<br>";
}
$count_display++;
$out .= $split[$k];
$displayed[] = $lowstr;
}
}
}
return $out;
}
break;
case "glpi_contracts.duration":
case "glpi_contracts.notice":
case "glpi_contracts.periodicity":
case "glpi_contracts.billing":
if (!empty($data[$NAME . $num])) {
$split = explode('$$$$', $data[$NAME . $num]);
$output = "";
foreach ($split as $duration) {
$output .= (empty($output) ? '' : '<br>') . $duration . " " . $LANG['financial'][57];
}
return $output;
}
return " ";
case "glpi_contracts.renewal":
return Contract::getContractRenewalName($data[$NAME . $num]);
case "glpi_infocoms.sink_time":
if (!empty($data[$NAME . $num])) {
$split = explode("\$\$\$\$", $data[$NAME . $num]);
$out = '';
foreach ($split as $val) {
$out .= empty($out) ? '' : '<br>';
if ($val > 0) {
$out .= $val . " " . $LANG['financial'][9];
}
}
return $out;
}
return " ";
case "glpi_infocoms.warranty_duration":
if (!empty($data[$NAME . $num])) {
$split = explode("\$\$\$\$", $data[$NAME . $num]);
$out = '';
foreach ($split as $val) {
$out .= empty($out) ? '' : '<br>';
if ($val > 0) {
$out .= $val . " " . $LANG['financial'][57];
}
if ($val < 0) {
$out .= $LANG['financial'][2];
}
}
return $out;
}
return " ";
case "glpi_infocoms.sink_type":
$split = explode("\$\$\$\$", $data[$NAME . $num]);
$out = '';
示例2: giveItem
//.........这里部分代码省略.........
}
if (!empty($data[$NAME . $num])) {
$split = explode("\$\$\$\$", $data[$NAME . $num]);
$count_display = 0;
for ($k = 0; $k < count($split); $k++) {
$lowstr = Toolbox::strtolower($split[$k]);
if (strlen(trim($split[$k])) > 0 && !in_array($lowstr, $displayed)) {
if ($count_display) {
$out .= "<br>";
}
$count_display++;
$out .= $split[$k];
$displayed[] = $lowstr;
}
}
}
return $out;
}
break;
case "glpi_contracts.duration":
case "glpi_contracts.notice":
case "glpi_contracts.periodicity":
case "glpi_contracts.billing":
if (!empty($data[$NAME . $num])) {
$split = explode('$$$$', $data[$NAME . $num]);
$output = "";
foreach ($split as $duration) {
$output .= (empty($output) ? '' : '<br>') . sprintf(_n('%d month', '%d months', $duration), $duration);
}
return $output;
}
return " ";
case "glpi_contracts.renewal":
return Contract::getContractRenewalName($data[$NAME . $num]);
// case "glpi_infocoms.sink_time" :
// if (!empty($data[$NAME.$num])) {
// $split = explode("$$$$", $data[$NAME.$num]);
// $out = '';
// foreach ($split as $val) {
// $out .= (empty($out)?'':'<br>');
// if ($val > 0) {
// //TRANS: %d is a number of years
// $out .= sprintf(_n('%d year', '%d years', $val), $val);
// }
// }
// return $out;
// }
// return " ";
//
// case "glpi_infocoms.warranty_duration" :
// if (!empty($data[$NAME.$num])) {
// $split = explode("$$$$", $data[$NAME.$num]);
// $out = '';
// foreach ($split as $val) {
// $out .= (empty($out)?'':'<br>');
// if ($val > 0) {
// $out .= sprintf(_n('%d month', '%d months', $val), $val);
// }
// if ($val < 0) {
// $out .= __('Lifelong');
// }
// }
// return $out;
// }
// return " ";
// case "glpi_infocoms.sink_time" :
示例3: giveItem
//.........这里部分代码省略.........
}
if (!empty($data[$NAME . $num])) {
$split = explode("\$\$\$\$", $data[$NAME . $num]);
$count_display = 0;
for ($k = 0; $k < count($split); $k++) {
$lowstr = utf8_strtolower($split[$k]);
if (strlen(trim($split[$k])) > 0 && !in_array($lowstr, $displayed)) {
if ($count_display) {
$out .= "<br>";
}
$count_display++;
$out .= $split[$k];
$displayed[] = $lowstr;
}
}
}
return $out;
}
break;
case "glpi_contracts.duration":
case "glpi_contracts.notice":
case "glpi_contracts.periodicity":
case "glpi_contracts.billing":
if (!empty($data[$NAME . $num])) {
$split = explode('$$$$', $data[$NAME . $num]);
$output = "";
foreach ($split as $duration) {
$output .= (empty($output) ? '' : '<br>') . $duration . " " . $LANG['financial'][57];
}
return $output;
}
return " ";
case "glpi_contracts.renewal":
return Contract::getContractRenewalName($data[$NAME . $num]);
case "glpi_infocoms.sink_time":
if (!empty($data[$NAME . $num])) {
$split = explode("\$\$\$\$", $data[$NAME . $num]);
$out = '';
foreach ($split as $val) {
$out .= empty($out) ? '' : '<br>';
if ($val > 0) {
$out .= $val . " " . $LANG['financial'][9];
}
}
return $out;
}
return " ";
case "glpi_infocoms.warranty_duration":
if (!empty($data[$NAME . $num])) {
$split = explode("\$\$\$\$", $data[$NAME . $num]);
$out = '';
foreach ($split as $val) {
$out .= empty($out) ? '' : '<br>';
if ($val > 0) {
$out .= $val . " " . $LANG['financial'][57];
}
if ($val < 0) {
$out .= $LANG['financial'][2];
}
}
return $out;
}
return " ";
case "glpi_infocoms.sink_type":
$split = explode("\$\$\$\$", $data[$NAME . $num]);
$out = '';