static public getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] ) | ||
$field | ||
$name | (default '') | |
$values | (default '') | |
$options | array | array |
/** * @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 'content': return "<textarea cols='90' rows='6' name='{$name}'>" . $values['content'] . "</textarea>"; case 'type': $options['value'] = $values[$field]; return self::dropdownType($name, $options); } return parent::getSpecificValueToSelect($field, $name, $values, $options); }
/** * @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 'items_id': if (isset($values['itemtype']) && !empty($values['itemtype'])) { $options['name'] = $name; $options['value'] = $values[$field]; return Dropdown::show($values['itemtype'], $options); } break; case 'type': $options['value'] = $values[$field]; return self::dropdownType($name, $options); case 'global_validation': $options['global'] = true; $options['value'] = $values[$field]; return TicketValidation::dropdownStatus($name, $options); } return parent::getSpecificValueToSelect($field, $name, $values, $options); }