Conditions | 5 |
Paths | 1 |
Total Lines | 25 |
Code Lines | 19 |
Lines | 25 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
18 | public function __construct($input_settings = array()) |
||
19 | { |
||
20 | $this->_set_display_strategy( |
||
21 | new EE_Number_Input_Display_Strategy( |
||
22 | isset($input_settings['min_value']) |
||
23 | ? $input_settings['min_value'] |
||
24 | : null, |
||
25 | isset($input_settings['max_value']) |
||
26 | ? $input_settings['max_value'] |
||
27 | : null, |
||
28 | isset($input_settings['step_value']) |
||
29 | ? $input_settings['step_value'] |
||
30 | : null |
||
31 | ) |
||
32 | ); |
||
33 | $this->_set_normalization_strategy(new EE_Float_Normalization()); |
||
34 | $this->_add_validation_strategy( |
||
35 | new EE_Float_Validation_Strategy( |
||
36 | isset($input_settings['validation_error_message']) |
||
37 | ? $input_settings['validation_error_message'] |
||
38 | : null |
||
39 | ) |
||
40 | ); |
||
41 | parent::__construct($input_settings); |
||
42 | } |
||
43 | } |
||
44 |