getValueToSelect() public méthode

Select a field using standard system
public getValueToSelect ( $field_id_or_search_options, $name = '', $values = '', $options = [] ) : return
$field_id_or_search_options integer/string/array id of the search option field or field name or search option array
$name string name of the select (if empty use linkfield) (default '')
$values mixed default value to display (default '')
$options array of possible options: Parameters which could be used in options array : - comments : boolean / is the comments displayed near the value (default false) - any others options passed to specific display method
Résultat return the string to display
 function getValueToSelect($field_id_or_search_options, $name = '', $values = '', $options = array())
 {
     switch ($field_id_or_search_options['table'] . '.' . $field_id_or_search_options['field']) {
         // For searchoption "Type"
         case $this->getTable() . '.type':
             $options['display'] = false;
             return Dropdown::showFromArray($name, self::getTypes(), $options);
         case $this->getTable() . '.itemtypes':
             $options['display'] = false;
             return Dropdown::showFromArray($name, self::getItemtypes(), $options);
     }
     return parent::getValueToSelect($field_id_or_search_options, $name, $values, $options);
 }