CommonDBTM::getSpecificValueToSelect PHP Method

getSpecificValueToSelect() static public method

display a specific field selection system
static public getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] ) : return
$field String name of the field
$name string name of the select (if empty use linkfield) (default '')
$values String/Array with the value to select or a Single value (default '')
$options array Array of options
return return the string to display
    static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
    {
        return '';
    }

Usage Example

Example #1
0
 /**
  * @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);
 }
All Usage Examples Of CommonDBTM::getSpecificValueToSelect
CommonDBTM