当前位置: 首页>>代码示例>>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;未经允许,请勿转载。