當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CommonDBTM::getSpecificValueToDisplay方法代碼示例

本文整理匯總了PHP中CommonDBTM::getSpecificValueToDisplay方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonDBTM::getSpecificValueToDisplay方法的具體用法?PHP CommonDBTM::getSpecificValueToDisplay怎麽用?PHP CommonDBTM::getSpecificValueToDisplay使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CommonDBTM的用法示例。


在下文中一共展示了CommonDBTM::getSpecificValueToDisplay方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getSpecificValueToDisplay

 /**
  * @since version 0.84
  *
  * @param $field
  * @param $values
  * @param $options   array
  **/
 static function getSpecificValueToDisplay($field, $values, array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     switch ($field) {
         case 'alert':
             return self::getAlertName($values[$field]);
         case 'renewal':
             return self::getContractRenewalName($values[$field]);
     }
     return parent::getSpecificValueToDisplay($field, $values, $options);
 }
開發者ID:gaforeror,項目名稱:glpi,代碼行數:20,代碼來源:contract.class.php

示例2: getSpecificValueToDisplay

 static function getSpecificValueToDisplay($field, $values, array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     switch ($field) {
         case 'items_id':
             if (isset($values['itemtype'])) {
                 $itemtype = $values['itemtype'];
                 $item = new $itemtype();
                 $item->getFromDB($values[$field]);
                 return $item->getLink();
             }
             break;
         case 'users_id':
             $user = new User();
             $user->getFromDB($values[$field]);
             return $user->getName(1);
             break;
     }
     return parent::getSpecificValueToDisplay($field, $values, $options);
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:22,代碼來源:acknowledge.class.php

示例3: getSpecificValueToDisplay

 /**
  * @since version 0.85
  *
  * @param $field
  * @param $values
  * @param $options   array
  **/
 static function getSpecificValueToDisplay($field, $values, array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     switch ($field) {
         case 'resolution_time':
             switch ($values['definition_time']) {
                 case 'minute':
                     return sprintf(_n('%d minute', '%d minutes', $values[$field]), $values[$field]);
                 case 'hour':
                     return sprintf(_n('%d hour', '%d hours', $values[$field]), $values[$field]);
                 case 'day':
                     return sprintf(_n('%d day', '%d days', $values[$field]), $values[$field]);
             }
             break;
     }
     return parent::getSpecificValueToDisplay($field, $values, $options);
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:26,代碼來源:sla.class.php

示例4: getSpecificValueToDisplay

 /**
  * @since version 0.84
  *
  * @param $field
  * @param $values
  * @param $options   array
  **/
 static function getSpecificValueToDisplay($field, $values, array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     switch ($field) {
         case 'interface':
             return self::getInterfaceName($values[$field]);
         case 'helpdesk_hardware':
             return self::getHelpdeskHardwareTypeName($values[$field]);
         case "helpdesk_item_type":
             $types = explode(',', $values[$field]);
             $message = array();
             foreach ($types as $type) {
                 if ($item = getItemForItemtype($type)) {
                     $message[] = $item->getTypeName();
                 }
             }
             return implode(', ', $message);
     }
     return parent::getSpecificValueToDisplay($field, $values, $options);
 }
開發者ID:glpi-project,項目名稱:glpi,代碼行數:29,代碼來源:profile.class.php

示例5: getSpecificValueToDisplay

 /**
  * @since version 0.84
  *
  * @param $field
  * @param $values
  * @param $options   array
  **/
 static function getSpecificValueToDisplay($field, $values, array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     switch ($field) {
         case 'replace_method':
             if ($values['replace_method'] != 0) {
                 return self::getMethodReplacement($values['replace_method']);
             }
             return Dropdown::EMPTY_VALUE;
             break;
         case 'types_id':
             if ($values['types_id'] == self::TYPE_MODEL_UNINSTALL) {
                 return __('Uninstallation', 'uninstall');
             }
             return __('Replacement', 'uninstall');
             break;
         case 'groups_id':
             if ($values['groups_id'] < 0) {
                 return __('Keep in the current group', 'uninstall');
             } else {
                 if (!$values['groups_id']) {
                     return __('None');
                 }
             }
             return Dropdown::getDropdownName('glpi_groups', $values['groups_id']);
             break;
     }
     return parent::getSpecificValueToDisplay($field, $values, $options);
 }
開發者ID:pluginsGLPI,項目名稱:uninstall,代碼行數:38,代碼來源:model.class.php

示例6: getSpecificValueToDisplay

 static function getSpecificValueToDisplay($field, $values, array $options = array())
 {
     switch ($field) {
         case 'dolog_method':
             $methods = self::getLogMethod();
             return $methods[$values[$field]];
         case 'ipv4_range_start':
         case 'ipv4_range_end':
             return long2ip($values[$field]);
     }
     return parent::getSpecificValueToDisplay($field, $values, $options);
 }
開發者ID:btry,項目名稱:glpi,代碼行數:12,代碼來源:apiclient.class.php

示例7: getSpecificValueToDisplay

 /**
  * display a value according to a field
  *
  * @since version 0.83
  *
  * @param $field     String         name of the field
  * @param $values    String / Array with the value to display
  * @param $options   Array          of option
  *
  * @return a string
  **/
 static function getSpecificValueToDisplay($field, $values, array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     switch ($field) {
         case 'priority':
             return CommonITILObject::getPriorityName($values[$field]);
         case 'visibility':
             return self::getVisibilityName($values[$field]);
         case 'state':
             return Planning::getState($values[$field]);
     }
     return parent::getSpecificValueToDisplay($field, $values, $options);
 }
開發者ID:InfotelGLPI,項目名稱:tasklists,代碼行數:26,代碼來源:task.class.php

示例8: getSpecificValueToDisplay

 /**
  * @since version 0.84
  *
  * @param $field
  * @param $values
  * @param $options   array
  **/
 static function getSpecificValueToDisplay($field, $values, array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     switch ($field) {
         case 'reason':
             return self::getReason($values[$field]);
     }
     return parent::getSpecificValueToDisplay($field, $values, $options);
 }
開發者ID:gaforeror,項目名稱:glpi,代碼行數:18,代碼來源:notimportedemail.class.php

示例9: getSpecificValueToDisplay

 /**
  * @since version 0.84
  *
  * @param $field
  * @param $values
  * @param $options   array
  **/
 static function getSpecificValueToDisplay($field, $values, array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     switch ($field) {
         case 'reason':
             return self::getReason($values[$field]);
         case 'messageid':
             $clean = array('<' => '', '>' => '');
             return strtr($values[$field], $clean);
     }
     return parent::getSpecificValueToDisplay($field, $values, $options);
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:21,代碼來源:notimportedemail.class.php

示例10: getSpecificValueToDisplay

 /**
  * @param $field
  * @param $values
  * @param $options   array
  **/
 static function getSpecificValueToDisplay($field, $values, array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     switch ($field) {
         case 'headers':
             $values[$field] = importArrayFromDB($values[$field]);
             $out = '';
             if (is_array($values[$field]) && count($values[$field])) {
                 foreach ($values[$field] as $key => $val) {
                     $out .= $key . ': ' . $val . '<br>';
                 }
             }
             return $out;
             break;
     }
     return parent::getSpecificValueToDisplay($field, $values, $options);
 }
開發者ID:simaostephanie,項目名稱:glpi,代碼行數:24,代碼來源:queuedmail.class.php

示例11: getSpecificValueToDisplay

 static function getSpecificValueToDisplay($field, $values, array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     switch ($field) {
         case 'date_expiration':
             if (empty($values[$field])) {
                 return __('infinite');
             } else {
                 return Html::convdate($values[$field]);
             }
             break;
     }
     return parent::getSpecificValueToDisplay($field, $values, $options);
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:16,代碼來源:badge.class.php

示例12: getSpecificValueToDisplay

 /**
  * @since version 2.3.0
  *
  * @param $field
  * @param $values
  * @param $options   array
  **/
 static function getSpecificValueToDisplay($field, $values, array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     switch ($field) {
         case "port_unicity":
             return PluginDatainjectionDropdown::getPortUnicityValues($values['port_unicity']);
         case "float_format":
             return PluginDatainjectionDropdown::getFloatFormat($values['float_format']);
         case "date_format":
             return PluginDatainjectionDropdown::getDateFormat($values['date_format']);
         case "step":
             return PluginDatainjectionDropdown::getStatusLabel($values['step']);
     }
     return parent::getSpecificValueToDisplay($field, $values, $options);
 }
開發者ID:JULIO8,項目名稱:respaldo_glpi,代碼行數:24,代碼來源:model.class.php

示例13: getSpecificValueToDisplay

 static function getSpecificValueToDisplay($field, $values, array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     switch ($field) {
         case 'calendars_id':
             $calendar = new Calendar();
             $calendar->getFromDB($values[$field]);
             return $calendar->getName(1);
             break;
         case 'freshness_type':
             $a_freshness_type = array();
             $a_freshness_type['seconds'] = __('Second(s)', 'monitoring');
             $a_freshness_type['minutes'] = __('Minute(s)', 'monitoring');
             $a_freshness_type['hours'] = __('Hour(s)', 'monitoring');
             $a_freshness_type['days'] = __('Day(s)', 'monitoring');
             return $a_freshness_type[$values[$field]];
             break;
     }
     return parent::getSpecificValueToDisplay($field, $values, $options);
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:22,代碼來源:component.class.php

示例14: getSpecificValueToDisplay

 static function getSpecificValueToDisplay($field, $values, array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     switch ($field) {
         case 'type':
             return self::getQuestionTypeName($values[$field]);
             break;
     }
     return parent::getSpecificValueToDisplay($field, $values, $options);
 }
開發者ID:geldarr,項目名稱:hack-space,代碼行數:12,代碼來源:question.class.php

示例15: getSpecificValueToDisplay

 /**
  * @param $field
  * @param $values
  * @param $options   array
  **/
 static function getSpecificValueToDisplay($field, $values, array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     switch ($field) {
         case 'refresh_rate':
             return Html::timestampToString($values[$field], false);
     }
     return parent::getSpecificValueToDisplay($field, $values, $options);
 }
開發者ID:stweil,項目名稱:glpi,代碼行數:16,代碼來源:rssfeed.class.php


注:本文中的CommonDBTM::getSpecificValueToDisplay方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。