Dropdown of validation status
static public dropdownStatus ( $name, $options = [] ) : nothing | ||
$name | select name | |
$options | array of possible options: - value : default value (default waiting) - all : boolean display all (default false) - global : for global validation (default false) - display : boolean display or get string ? (default true) | |
Результат | nothing | (display) |
/** * @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); }