本文整理汇总了PHP中Contract::getAlertName方法的典型用法代码示例。如果您正苦于以下问题:PHP Contract::getAlertName方法的具体用法?PHP Contract::getAlertName怎么用?PHP Contract::getAlertName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contract
的用法示例。
在下文中一共展示了Contract::getAlertName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSpecificValueToDisplay
//.........这里部分代码省略.........
return __('Inheritance of the parent entity');
case 0:
return __('No');
}
return sprintf(_n('%d day', '%d days', $values[$field]), $values[$field]);
case 'cartridges_alert_repeat':
case 'consumables_alert_repeat':
switch ($values[$field]) {
case self::CONFIG_PARENT:
return __('Inheritance of the parent entity');
case self::CONFIG_NEVER:
case 0:
// For compatibility issue
return __('Never');
case DAY_TIMESTAMP:
return __('Each day');
case WEEK_TIMESTAMP:
return __('Each week');
case MONTH_TIMESTAMP:
return __('Each month');
default:
// Display value if not defined
return $values[$field];
}
break;
case 'notclosed_delay':
// 0 means never
switch ($values[$field]) {
case self::CONFIG_PARENT:
return __('Inheritance of the parent entity');
case 0:
return __('Never');
}
return sprintf(_n('%d day', '%d days', $values[$field]), $values[$field]);
case 'auto_assign_mode':
return self::getAutoAssignMode($values[$field]);
case 'tickettype':
if ($values[$field] == self::CONFIG_PARENT) {
return __('Inheritance of the parent entity');
}
return Ticket::getTicketTypeName($values[$field]);
case 'autofill_buy_date':
case 'autofill_order_date':
case 'autofill_delivery_date':
case 'autofill_use_date':
case 'autofill_warranty_date':
switch ($values[$field]) {
case self::CONFIG_PARENT:
return __('Inheritance of the parent entity');
case Infocom::COPY_WARRANTY_DATE:
return __('Copy the start date of warranty');
case Infocom::COPY_BUY_DATE:
return __('Copy the date of purchase');
case Infocom::COPY_ORDER_DATE:
return __('Copy the order date');
case Infocom::COPY_DELIVERY_DATE:
return __('Copy the delivery date');
default:
if (strstr($values[$field], '_')) {
list($type, $sid) = explode('_', $values[$field], 2);
if ($type == Infocom::ON_STATUS_CHANGE) {
// TRANS %s is the name of the state
return sprintf(__('Fill when shifting to state %s'), Dropdown::getDropdownName('glpi_states', $sid));
}
}
}
return __('No autofill');
case 'inquest_config':
if ($values[$field] == self::CONFIG_PARENT) {
return __('Inheritance of the parent entity');
}
return TicketSatisfaction::getTypeInquestName($values[$field]);
case 'default_contract_alert':
return Contract::getAlertName($values[$field]);
case 'default_infocom_alert':
return Infocom::getAlertName($values[$field]);
case 'entities_id_software':
if ($values[$field] == self::CONFIG_NEVER) {
return __('No change of entity');
}
if ($values[$field] == self::CONFIG_PARENT) {
return __('Inheritance of the parent entity');
}
return Dropdown::getDropdownName('glpi_entities', $values[$field]);
case 'tickettemplates_id':
if ($values[$field] == self::CONFIG_PARENT) {
return __('Inheritance of the parent entity');
}
return Dropdown::getDropdownName('glpi_tickettemplates', $values[$field]);
case 'calendars_id':
switch ($values[$field]) {
case self::CONFIG_PARENT:
return __('Inheritance of the parent entity');
case 0:
return __('24/7');
}
return Dropdown::getDropdownName('glpi_calendars', $values[$field]);
}
return parent::getSpecificValueToDisplay($field, $values, $options);
}