Profile::getSpecificValueToSelect PHP Method

getSpecificValueToSelect() static public method

static public getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] )
$field
$name (default '')
$values (default '')
$options array 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);
    }