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


PHP CommonDBTM::getSpecificValueToSelect方法代碼示例

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


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

示例1: getSpecificValueToSelect

 /**
  * @since version 0.84
  *
  * @param $field
  * @param $name            (default '')
  * @param $values          (default '')
  * @param $options   array
  *
  * @return string
  **/
 static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     $options['display'] = false;
     switch ($field) {
         case 'priority':
             $options['name'] = $name;
             $options['value'] = $values[$field];
             $options['withmajor'] = 1;
             return CommonITILObject::dropdownPriority($options);
         case 'visibility':
             $options['name'] = $name;
             $options['value'] = $values[$field];
             return self::dropdownVisibility($options);
         case 'state':
             return Planning::dropdownState($name, $values[$field], false);
     }
     return parent::getSpecificValueToSelect($field, $name, $values, $options);
 }
開發者ID:InfotelGLPI,項目名稱:tasklists,代碼行數:31,代碼來源:task.class.php

示例2: getSpecificValueToSelect

 /**
  * @since version 0.84
  *
  * @param $field
  * @param $name            (default '')
  * @param $values          (default '')
  * @param $options   array
  **/
 static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     $options['display'] = false;
     switch ($field) {
         case 'status':
             $options['name'] = $name;
             $options['value'] = $values[$field];
             return self::dropdownStatus($options);
         case 'impact':
             $options['name'] = $name;
             $options['value'] = $values[$field];
             return self::dropdownImpact($options);
         case 'urgency':
             $options['name'] = $name;
             $options['value'] = $values[$field];
             return self::dropdownUrgency($options);
         case 'priority':
             $options['name'] = $name;
             $options['value'] = $values[$field];
             return self::dropdownPriority($options);
         case 'global_validation':
             $options['global'] = true;
             $options['value'] = $values[$field];
             return CommonITILValidation::dropdownStatus($name, $options);
     }
     return parent::getSpecificValueToSelect($field, $name, $values, $options);
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:38,代碼來源:commonitilobject.class.php

示例3: getSpecificValueToSelect

 /**
  * @since version 0.84
  *
  * @param $field
  * @param $name               (default '')
  * @param $values             (default '')
  * @param $options      array
  **/
 static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     $options['display'] = false;
     switch ($field) {
         case 'state':
             return Planning::dropdownState($name, $values[$field], false);
     }
     return parent::getSpecificValueToSelect($field, $name, $values, $options);
 }
開發者ID:gaforeror,項目名稱:glpi,代碼行數:20,代碼來源:reminder.class.php

示例4: getSpecificValueToSelect

 /**
  * @since version 0.84
  *
  * @param $field
  * @param $name               (default '')
  * @param $values             (default '')
  * @param $options      array
  **/
 static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     $options['display'] = 0;
     switch ($field) {
         case 'mode':
             $options['value'] = $values[$field];
             $tab[self::MODE_INTERNAL] = self::getModeName(self::MODE_INTERNAL);
             $tab[self::MODE_EXTERNAL] = self::getModeName(self::MODE_EXTERNAL);
             return Dropdown::showFromArray($name, $tab, $options);
         case 'state':
             return CronTask::dropdownState($name, $values[$field], false);
     }
     return parent::getSpecificValueToSelect($field, $name, $values, $options);
 }
開發者ID:glpi-project,項目名稱:glpi,代碼行數:25,代碼來源:crontask.class.php

示例5: getSpecificValueToSelect

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

示例6: getSpecificValueToSelect

 /**
  * @since version 0.84
  *
  * @param  $field
  * @param  $name              (default '')
  * @param  $values            (default('')
  * @param  $options   array
  **/
 static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     $options['display'] = false;
     switch ($field) {
         case 'group_search_type':
             $options['value'] = $values[$field];
             $options['name'] = $name;
             return self::dropdownGroupSearchType($options);
     }
     return parent::getSpecificValueToSelect($field, $name, $values, $options);
 }
開發者ID:euqip,項目名稱:glpi-smartcities,代碼行數:22,代碼來源:authldap.class.php

示例7: getSpecificValueToSelect

 /**
  * Define how to display search field for a specific type
  *
  * @since version 0.84
  *
  * @param String $field           Name of the field as define in $this->getSearchOptions()
  * @param String $name            Name attribute for the field to be posted (default '')
  * @param Array  $values          Array of all values to display in search engine (default '')
  * @param Array  $options         Options (optional)
  *
  * @return String                 Html string to be displayed for the form field
  **/
 public static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     $options['display'] = false;
     switch ($field) {
         case 'is_active':
             $output = "<select name='" . $name . "'>";
             $output .= "<option value='0' " . ($values[$field] == 0 ? " selected " : "") . ">" . __('Inactive') . "</option>";
             $output .= "<option value='1' " . ($values[$field] == 1 ? " selected " : "") . ">" . __('Active') . "</option>";
             $output .= "</select>";
             return $output;
             break;
         case 'access_rights':
             $output = '<select name="' . $name . '">';
             $output .= '<option value="' . self::ACCESS_PUBLIC . '" ' . ($values[$field] == 0 ? ' selected ' : '') . '>' . __('Public access', 'formcreator') . '</option>';
             $output .= '<option value="' . self::ACCESS_PRIVATE . '" ' . ($values[$field] == 1 ? ' selected ' : '') . '>' . __('Private access', 'formcreator') . '</option>';
             $output .= '<option value="' . self::ACCESS_RESTRICTED . '" ' . ($values[$field] == 1 ? ' selected ' : '') . '>' . __('Restricted access', 'formcreator') . '</option>';
             $output .= '</select>';
             return $output;
             break;
         case 'language':
             return Dropdown::showLanguages('language', array('value' => $values[$field], 'display_emptychoice' => true, 'emptylabel' => '--- ' . __('All langages', 'formcreator') . ' ---', 'display' => false));
             break;
     }
     return parent::getSpecificValueToSelect($field, $name, $values, $options);
 }
開發者ID:jcr0ch4,項目名稱:formcreator,代碼行數:40,代碼來源:form.class.php

示例8: getSpecificValueToSelect

 static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     $options['display'] = false;
     switch ($field) {
         case 'type':
             return self::dropdownGroupType($name, $values[$field]);
         default:
             break;
     }
     return parent::getSpecificValueToSelect($field, $name, $values, $options);
 }
開發者ID:korial29,項目名稱:fusioninventory-for-glpi,代碼行數:14,代碼來源:deploygroup.class.php

示例9: getSpecificValueToSelect

 /**
  * @since version 0.84
  *
  * @param $field
  * @param $name               (default '')
  * @param $values             (default '')
  * @param $options      array
  **/
 static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     $options['display'] = false;
     switch ($field) {
         case 'event':
             if (isset($values['itemtype']) && !empty($values['itemtype'])) {
                 $options['value'] = $values[$field];
                 $options['name'] = $name;
                 return NotificationEvent::dropdownEvents($values['itemtype'], $options);
             }
             break;
         case 'mode':
             $options['value'] = $values[$field];
             $options['name'] = $name;
             return self::dropdownMode($options);
     }
     return parent::getSpecificValueToSelect($field, $name, $values, $options);
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:29,代碼來源:notification.class.php

示例10: getSpecificValueToSelect

 /**
  * @since version 0.84
  *
  * @param $field
  * @param $name                  (default '')
  * @param $values                (default '')
  * @param $options   array
  **/
 static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     $options['display'] = false;
     switch ($field) {
         case 'type':
             $options['value'] = $values[$field];
             $typeinquest = array(1 => __('Internal survey'), 2 => __('External survey'));
             return Dropdown::showFromArray($name, $typeinquest, $options);
     }
     return parent::getSpecificValueToSelect($field, $name, $values, $options);
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:22,代碼來源:ticketsatisfaction.class.php

示例11: getSpecificValueToSelect

 /**
  * @since version 0.84
  *
  * @param $field
  * @param $name               (default '')
  * @param $values             (default '')
  * @param $options      array
  **/
 static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     $options['display'] = false;
     switch ($field) {
         case 'reason':
             $options['value'] = $values[$field];
             return Dropdown::showFromArray($name, self::getAllReasons(), $options);
     }
     return parent::getSpecificValueToSelect($field, $name, $values, $options);
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:21,代碼來源:notimportedemail.class.php

示例12: getSpecificValueToSelect

 /**
  * @since version 2.3.0
  *
  * @param $field
  * @param $name               (default '')
  * @param $values             (defaut '')
  * @param $options   array
  **/
 static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     $options['display'] = false;
     switch ($field) {
         case 'step':
             $options['value'] = $values[$field];
             return Dropdown::showFromArray($name, PluginDatainjectionDropdown::statusLabels(), $options);
         case 'port_unicity':
             $options['value'] = $values[$field];
             return Dropdown::showFromArray($name, PluginDatainjectionDropdown::portUnicityValues(), $options);
         case 'float_format':
             $options['value'] = $values[$field];
             return Dropdown::showFromArray($name, PluginDatainjectionDropdown::floatFormats(), $options);
         case 'date_format':
             $options['value'] = $values[$field];
             return Dropdown::showFromArray($name, PluginDatainjectionDropdown::dateFormats(), $options);
     }
     return parent::getSpecificValueToSelect($field, $name, $values, $options);
 }
開發者ID:JULIO8,項目名稱:respaldo_glpi,代碼行數:30,代碼來源:model.class.php

示例13: getSpecificValueToSelect

 /**
  * Define how to display search field for a specific type
  *
  * @since version 0.84
  *
  * @param String $field           Name of the field as define in $this->getSearchOptions()
  * @param String $name            Name attribute for the field to be posted (default '')
  * @param Array  $values          Array of all values to display in search engine (default '')
  * @param Array  $options         Options (optional)
  *
  * @return String                 Html string to be displayed for the form field
  **/
 public static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     $options['display'] = false;
     switch ($field) {
         case 'is_active':
             return Dropdown::showFromArray('criteria[0][value]', array('0' => __('Inactive'), '1' => __('Active')), array('value' => $values[$field], 'display_emptychoice' => true, 'display' => false));
             break;
         case 'access_rights':
             return Dropdown::showFromArray('criteria[0][value]', array(Dropdown::EMPTY_VALUE => '--- ' . __('All langages', 'formcreator') . ' ---', self::ACCESS_PUBLIC => __('Public access', 'formcreator'), self::ACCESS_PRIVATE => __('Private access', 'formcreator'), self::ACCESS_RESTRICTED => __('Restricted access', 'formcreator')), array('value' => $values[$field], 'display_emptychoice' => true, 'display' => false));
             break;
         case 'language':
             return Dropdown::showLanguages('criteria[0][value]', array('value' => $values[$field], 'display_emptychoice' => true, 'emptylabel' => '--- ' . __('All langages', 'formcreator') . ' ---', 'display' => false));
             break;
     }
     return parent::getSpecificValueToSelect($field, $name, $values, $options);
 }
開發者ID:ChristopheG77,項目名稱:formcreator,代碼行數:31,代碼來源:form.class.php

示例14: getSpecificValueToSelect

 /**
  * @since version 0.84
  *
  * @param $field
  * @param $name               (default '')
  * @param $values             (default '')
  * @param $options      array
  **/
 static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     $options['display'] = false;
     switch ($field) {
         case 'interface':
             $options['value'] = $values[$field];
             return Dropdown::showFromArray($name, self::getInterfaces(), $options);
         case 'helpdesk_hardware':
             $options['value'] = $values[$field];
             return Dropdown::showFromArray($name, self::getHelpdeskHardwareTypes(), $options);
         case "helpdesk_item_type":
             $options['values'] = explode(',', $values[$field]);
             $options['name'] = $name;
             return self::dropdownHelpdeskItemtypes($options);
     }
     return parent::getSpecificValueToSelect($field, $name, $values, $options);
 }
開發者ID:glpi-project,項目名稱:glpi,代碼行數:28,代碼來源:profile.class.php

示例15: getSpecificValueToSelect

 /**
  * @param  $field
  * @param  $name              (default '')
  * @param  $values            (default '')
  * @param  $options   array
  **/
 static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
 {
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     $options['display'] = false;
     switch ($field) {
         case 'match':
             if (isset($values['itemtype']) && !empty($values['itemtype'])) {
                 $options['value'] = $values[$field];
                 $options['name'] = $name;
                 $rule = new static();
                 return $rule->dropdownRulesMatch($options);
             }
             break;
     }
     return parent::getSpecificValueToSelect($field, $name, $values, $options);
 }
開發者ID:pvasener,項目名稱:glpi,代碼行數:24,代碼來源:rule.class.php


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